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

MaxLength not respected #131

Open
FilippoBoni1921 opened this issue Dec 19, 2024 · 3 comments
Open

MaxLength not respected #131

FilippoBoni1921 opened this issue Dec 19, 2024 · 3 comments

Comments

@FilippoBoni1921
Copy link

FilippoBoni1921 commented Dec 19, 2024

The parameter maxLength specified in the json schema is not respected

'organizationid': {'type': 'string', 'description': 'an Id composed of number followed by a letter', 'maxLength': 40}

Output:

"organizationid": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345

@Ubospica
Copy link
Collaborator

Hi @FilippoBoni1921, thanks for the report!

The maxLength and minLength keywords are not supported now. We are working to support it in a recent version.

@FilippoBoni1921
Copy link
Author

FilippoBoni1921 commented Jan 16, 2025

Hi @Ubospica ! Thank you for looking into this issue. I really appreciate your time and effort. I was wondering if you've had the chance to explore this further. Is there any way I can assist? If there's any specific information, logs, or context I can provide to help, please let me know!

@Ubospica
Copy link
Collaborator

Ubospica commented Jan 17, 2025

Hi @FilippoBoni1921 , thanks for getting back to this issue. We already have the infrastructure (mainly supporting the repetition range #144 ) for the minlen and maxlen, and still need to work on enhancing the json schema converter to EBNF, and thorough testing to ensure the robustness. We are enhancing the json schema converter recently, so I expect it will be supported soon!

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

No branches or pull requests

2 participants