Skip to content

Conversation

@7opf
Copy link

@7opf 7opf commented Sep 12, 2025

JSON Schema Validation defines the pattern keyword, but does not define any patternDescription keyword. This keyword seems to be used only by Huma.

@7opf
Copy link
Author

7opf commented Sep 12, 2025

It's not clear to me whether this is the correct fix. I just saw that the Nullable field is omitted from yaml serialisation, possibly for the same reason.

@7opf 7opf marked this pull request as ready for review September 12, 2025 15:29
@wolveix
Copy link
Collaborator

wolveix commented Jan 18, 2026

Thanks for opening this @7opf! Looking back, this was implemented in #323 by @purin-dev, and @danielgtaylor directly added the line to our JSON marshaler. I can't tell if it's intentional for it to be within the schema or not; however, I do agree that I'm not sure it should be (at best, it should be marshaled as x-patternDescription as that's the standard convention for OpenAPI extensions). Will await further clarity from the others :)

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