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

fix: flatten enum inside Option #318

Closed
wants to merge 1 commit into from

Conversation

meskill
Copy link

@meskill meskill commented Aug 14, 2024

fixes #317

@GREsau
Copy link
Owner

GREsau commented Aug 16, 2024

I'm afraid the schemas generated by this change are not correct. For the flatten_option_enum.json schema from the tests:

  • one of the subschemas has "type": null which is invalid in that context - presumably you intended it to be "type": "null"?
  • even with that fixed, the empty object {} does not successfully validate against the schema when it should (because it can successfuly deserialize to FlattenOptionEnum { enum_: None })

@GREsau GREsau closed this Aug 16, 2024
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.

flatten of Option<Enum> generates schema where enum is required
3 participants