-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: No maxLength label is displayed for arrays of items #1701
Comments
Instead of creating new issue just making confirmation on starts:
type: array
items:
type: string
description: "My start list"
minLength: 3
maxLength: 100
maxItems: 12 starts:
type: array
items:
type: string
description: "My start list"
pattern: /([A-Z])/
maxItems: 12 It seems starts:
type: array
items:
type: string
enum: [Jr. Test, Dr. Tester]
maxItems: 12 Maybe With With With |
I don't believe the current implementation will show constraint badges for array item types. In situations where constraint badges appear next to array-based fields, they refer to the constraint applying to the array itself. An example is The additional problem here is how best to present the array item type constraints. A naive (and I think quick) solution would be to collect and stack all array item type constraints adjacent to array constraints. However, this mightn't read intuitively. Example:
@RomanHotsiy, if you've got any opinions on how best to present the array item type constraints, I can have a shot at making changes to support them. |
I believe there is a PR already in progress related to this but I have to check if this is considered. See the mentioned PR above. |
* fix: No maxLength label is displayed for arrays of items #1701 * Revert "fix: No maxLength label is displayed for arrays of items #1701" This reverts commit 543ecc4. * fix: No maxLength label is displayed for arrays of items #1701 * change array items display * fix alignment * remove theme font from labels * update snapshot Co-authored-by: Oprysk <vyacheslav@redocly.com>
Hey there, it seems there's some bug with rendering maxLength badges on array of items described by a schema.
Sample json property
Expected behaviour:
<=80 characters
badge is displayedActual:
redoc-cli v0.10.4
Note:
Any advice or help is greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: