fix: No maxLength label is displayed for arrays of items #1701#1765
Conversation
|
@zalesky can you update screenshots plz? |
|
@RomanHotsiy updated |
|
@RomanHotsiy @zalesky Should we support https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-6.1.1 |
|
Can this be merged? @RomanHotsiy |
|
@jeremyfiel no, not yet. We're still trying to find an optimal UI for this. |
|
can I suggest using the following text blocks? following use cases of
properties:
name:
description: 'this is a description'
type: array
items:
type: string
maxLength: 80
properties:
name:
description: 'this is a description'
type: array
items:
type: string
pattern: '^[a-z]$'
properties:
name:
description: 'this is a description'
type: array
items:
type: string
minLength: 2
maxLength: 80
properties:
name:
description: 'this is a description'
type: array
items:
type: string
minLength: 2
maxLength: 80
pattern: '^[a-z]$'
properties:
name:
description: 'this is a description'
type: array
items:
type: integer
multipleOf: 5
properties:
name:
description: 'this is a description'
type: array
items:
type: integer
multipleOf: 5
maximum: 10
properties:
name:
description: 'this is a description'
type: array
items:
type: integer
multipleOf: 5
minimum: 5
maximum: 10
properties:
name:
description: 'this is a description'
type: array
items:
type: integer
minimum: 1
maximum: 100Valid in both OAS3.0.x AND OAS3.1.x properties:
name:
description: 'this is a description'
type: array
items:
type: integer
minimum: 1
exclusiveMaximum: true
maximum: 100Valid only for OAS3.1.x
properties:
name:
description: 'this is a description'
type: array
items:
type: integer
minimum: 1
exclusiveMaximum: 100 |
| export function ArrayItemDetails({ schema }: { schema: SchemaModel }) { | ||
| if (!schema || (schema.type === 'string' && !schema.constraints.length)) return null; | ||
|
|
||
| return ( |


What/Why/How?
closes: #1701
Reference
Screenshots (optional)
parameters example:
Before fix:
After fix:

additional cases:
Check yourself