-
-
Notifications
You must be signed in to change notification settings - Fork 347
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: add nullable condition to multipart formdata for openapi3.1 #1646
fix: add nullable condition to multipart formdata for openapi3.1 #1646
Conversation
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.
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.
@kosa3
I added a comment.
tests/specifications/null-type.yaml
Outdated
@@ -62,3 +80,18 @@ components: | |||
BlankEnum: | |||
enum: | |||
- '' | |||
MultipartFormDataNullable: |
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.
It's okay to use an existing schema 👍
https://github.com/orval-labs/orval/blob/master/tests/specifications/null-type.yaml#L41-L48
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.
Thanks, I fixed it.
I also found a bug when oneOf, anyOf, allOf
subschemas are attached and fixed it.
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.
it's good. I added some updated comments. Once you fix that, it's perfect!
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.
Thanks for good work !
Status
READY
Description
OpenAPI 3.1 introduces support for jsonschema's 'null' type, however,
there is a problem in multipart/formdata where the generated code does not correctly determine null.
Specifically, the expected output from the following yaml is different.
https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-7.6.1
input.yaml
Related PRs
List related PRs against other branches:
Todos
Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.