-
Notifications
You must be signed in to change notification settings - Fork 53
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
Outdated documentation re sum encoding differs ToSchema/ToJSON? #59
Comments
Thanks for the observation! Looks like the first paragraph you mentioned survived as-is from Would you like to make a PR to clean the docs? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is (in the haddock documentation) a statement that the default ToSchema and ToJSON instances differ in encoding sum types:
openapi3/src/Data/OpenApi.hs
Lines 330 to 333 in 8119d13
However, I think this is outdated and that you create a consistent schema using
oneOf
, as mentioned further down the documentationopenapi3/src/Data/OpenApi.hs
Lines 362 to 364 in 8119d13
Do (default) schemas for sum types agree with aeson, or am I missing something here (I cannot come up with a case where they disagree)?
The text was updated successfully, but these errors were encountered: