remove redundant minLength/maxLength constraints where length-limited pattern is given

This commit is contained in:
Michael Hoennig 2024-12-11 11:02:25 +01:00
parent 65f48160f8
commit 3c30ee4880
7 changed files with 4 additions and 26 deletions

View File

@ -27,8 +27,6 @@ components:
nullable: false
membership.memberNumber:
type: string
minLength: 9
maxLength: 9
pattern: 'M-[0-9]{7}'
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
@ -69,8 +67,6 @@ components:
nullable: false
membership.memberNumber:
type: string
minLength: 9
maxLength: 9
pattern: 'M-[0-9]{7}'
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
@ -130,8 +126,6 @@ components:
format: uuid
adoptingMembership.memberNumber:
type: string
minLength: 9
maxLength: 9
pattern: 'M-[0-9]{7}'
required:
- membership.uuid

View File

@ -13,8 +13,6 @@ components:
$ref: 'hs-office-relation-schemas.yaml#/components/schemas/HsOfficeRelation'
debitorNumber:
type: string
minLength: 9
maxLength: 9
pattern: 'D-[0-9]{7}'
debitorNumberSuffix:
type: string

View File

@ -12,8 +12,8 @@ get:
schema:
type: number
format: integer
# minimum: 1000000
# maximum: 9999999
minimum: 1000000
maximum: 9999999
description: debitor-number of the debitor to fetch.
responses:
"200":

View File

@ -25,8 +25,6 @@ get:
required: false
schema:
type: string
minLength: 7
maxLength: 7
pattern: 'P-[0-9]{5}'
description: Partner number of the requested debitor.
responses:

View File

@ -27,14 +27,10 @@ components:
$ref: 'hs-office-debitor-schemas.yaml#/components/schemas/HsOfficeDebitor'
memberNumber:
type: string
minLength: 9
maxLength: 9
pattern: 'M-[0-9]{7}'
memberNumberSuffix:
type: string
minLength: 2
maxLength: 2
pattern: '[0-9]+'
pattern: '[0-9]{2}'
validFrom:
type: string
format: date
@ -69,9 +65,7 @@ components:
nullable: false
memberNumberSuffix:
type: string
minLength: 2
maxLength: 2
pattern: '[0-9]+'
pattern: '[0-9]{2}'
nullable: false
validFrom:
type: string

View File

@ -20,8 +20,6 @@ get:
required: false
schema:
type: string
minLength: 7
maxLength: 7
pattern: 'P-[0-9]{5}'
description: partnerNumber of the partner the memberships belong to
responses:

View File

@ -11,8 +11,6 @@ components:
format: uuid
partnerNumber:
type: string
minLength: 7
maxLength: 7
pattern: 'P-[0-9]{5}'
partnerRel:
$ref: 'hs-office-relation-schemas.yaml#/components/schemas/HsOfficeRelation'
@ -87,8 +85,6 @@ components:
properties:
partnerNumber:
type: string
minLength: 7
maxLength: 7
pattern: 'P-[0-9]{5}'
partnerRel:
$ref: '#/components/schemas/HsOfficePartnerRelInsert'