You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: No maxLength label is displayed for arrays of items #1701
Instead of creating new issue just making confirmation on array items string type rules.
Confirming redoc-cli v0.12.2 has same behavior, pattern, description, minLength, maxLength rule badges are not rendered. Enum rendered.
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 maxItems, as pointed out in a previous comment.
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:
Array of strings [<= 3 items] [<= 80 characters]
...
@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.
Activity
ihah commentedon Aug 10, 2021
Instead of creating new issue just making confirmation on
arrayitemsstringtype rules.Confirming
redoc-cli v0.12.2has same behavior,pattern,description,minLength,maxLengthrule badges are not rendered.Enumrendered.It seems
enumrule works:Maybe
pattern,description,minLength,maxLengthstring rules should be rendered same asenumrule.With
pattern,minLength,maxLengthstring rulesItems pattern: A-Z
Items length: [ 3 .. 100 ] characters
With
maxLengthstring ruleItems length: <= 100 characters
With
minLengthstring ruleItems length: >= 10 characters
miqh commentedon Oct 7, 2021
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
maxItems, as pointed out in a previous comment.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.
RomanHotsiy commentedon Oct 8, 2021
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"
fix: No maxLength label is displayed for arrays of items #1701
fix: No maxLength label is displayed for arrays of items #1701 (#1765)