-
Notifications
You must be signed in to change notification settings - Fork 219
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
utopia-gen: Adjust params code to not set nullable
on Option
for Query
params
#1248
Conversation
dceca68
to
023df0b
Compare
Although this spec is for OpenAPI 3.0 and not for OpenAPI 3.1.x it is probably right to expect that |
yeah, unfortunately I couldn't find an equivalent example in the 3.1 spec, but given the validator results in #1215 I guess it's a safe assumption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems solid to me, 👍 Same here just a CHANGELOG.md entry probably under Changed
category
023df0b
to
8a0e2bf
Compare
done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set the ball rolling and merge it to master 🙂
This PR resolves #1215 by ensuring that
Option<_>
usage inQuery
params is not transformed into a nullable feature.https://swagger.io/docs/specification/v3_0/describing-parameters/#default-parameter-values gives an example on how
required: false
query parameters are described and there is nonullable: true
orschema.type: null
in there, which indicates thatrequired: false
should be sufficient to describe anOption<_>
type for query parameters.(Potentially) Related:
Option
non-required & addrequired
attr #530