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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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