Skip to content
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

add description and examples for maxLength keyword #110

Merged
merged 13 commits into from
Feb 12, 2024

Conversation

AgniveshChaubey
Copy link
Collaborator

This PR addresses #90


* Applies only to string data types.
* Value must be a non-negative integer.
* String length is counted in characters, not bytes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you mention it (which is a good point), I think it'd be good exemplifying this. I guess you can provide an instance that consists of unicode characters in the UTF-16 and/or UTF-32 range, showing that it still validates against maxLength based on the number of characters.

I recall seeing some examples of this in the JSON Schema Test Suite

Copy link
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a suggestion, but the rest looks good. I guess we can merge this one and do the other separately if you want

@AgniveshChaubey AgniveshChaubey merged commit 25bede3 into main Feb 12, 2024
1 check passed
@AgniveshChaubey AgniveshChaubey deleted the keyword-maxLength branch February 12, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants