-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add x-nullable (OAS2) support #889
Conversation
The What will be the result of (OAS3 example) a parameter and a Schema not telling the same: parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
x-nullable: false
schema:
type: integer
format: int64
nullable: true Is this consistently treated? |
Very good question. OAS3 shouldn't use/need |
The potential conflict between
My take is that with |
While I was investing, I have seen, the the conversion
is already correctly implemented by Swagger-Parser. This means the code proposed by #873 will already work with OAS2 and that this PR introduces unnecessary code that can be reverted. |
See follow up PR: #930 |
When I wrote this, I missed the changes on CodegenParameter and I had some unnecessary changes on CodegenModel. I realized my mistake when I went to add a similar change to openapi-generator and saw it was already there, and they knew more about what to do than I did. So, this is based in part on work by @wing328 and @jmini - OpenAPITools/openapi-generator#873 - OpenAPITools/openapi-generator#889 - OpenAPITools/openapi-generator#930
Requires: swagger-api/swagger-codegen#8809 When I wrote this, I missed the changes on CodegenParameter and I had some unnecessary changes on CodegenModel. I realized my mistake when I went to add a similar change to openapi-generator and saw it was already there, and they knew more about what to do than I did. So, this is based in part on work by @wing328 and @jmini - OpenAPITools/openapi-generator#873 - OpenAPITools/openapi-generator#889 - OpenAPITools/openapi-generator#930
When I wrote this, I missed the changes on CodegenParameter and I had some unnecessary changes on CodegenModel. I realized my mistake when I went to add a similar change to openapi-generator and saw it was already there, and they knew more about what to do than I did. So, this is based in part on work by @wing328 and @jmini - OpenAPITools/openapi-generator#873 - OpenAPITools/openapi-generator#889 - OpenAPITools/openapi-generator#930
Requires: swagger-api/swagger-codegen#8809 When I wrote this, I missed the changes on CodegenParameter and I had some unnecessary changes on CodegenModel. I realized my mistake when I went to add a similar change to openapi-generator and saw it was already there, and they knew more about what to do than I did. So, this is based in part on work by @wing328 and @jmini - OpenAPITools/openapi-generator#873 - OpenAPITools/openapi-generator#889 - OpenAPITools/openapi-generator#930
Requires: swagger-api/swagger-codegen#8809 When I wrote this, I missed the changes on CodegenParameter and I had some unnecessary changes on CodegenModel. I realized my mistake when I went to add a similar change to openapi-generator and saw it was already there, and they knew more about what to do than I did. So, this is based in part on work by wing328 and jmini - OpenAPITools/openapi-generator#873 - OpenAPITools/openapi-generator#889 - OpenAPITools/openapi-generator#930
* add x-nullable oas2 support * add test spec for testing x-nullable
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
A follow up PR to #873