-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Remove x-nullable extension support to support nullable #930
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wing328
approved these changes
Aug 30, 2018
4 tasks
bjgill
added a commit
that referenced
this pull request
Sep 3, 2018
* Restore support for nullable in rust-server Accounts for changes in #930. Adds a nullable field to the sample to reduce the risk of this regressing again in future. * Add test for required nullable field
This was referenced Oct 13, 2018
cognifloyd
added a commit
to cognifloyd/swagger-codegen
that referenced
this pull request
Oct 13, 2018
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
cognifloyd
added a commit
to cognifloyd/swagger-codegen-generators
that referenced
this pull request
Oct 13, 2018
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
cognifloyd
added a commit
to cognifloyd/swagger-codegen
that referenced
this pull request
Oct 13, 2018
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
cognifloyd
added a commit
to cognifloyd/swagger-codegen-generators
that referenced
this pull request
Dec 19, 2018
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
cognifloyd
added a commit
to cognifloyd/swagger-codegen-generators
that referenced
this pull request
Dec 19, 2018
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
A-Joshi
pushed a commit
to ihsmarkitoss/openapi-generator
that referenced
this pull request
Feb 27, 2019
A-Joshi
pushed a commit
to ihsmarkitoss/openapi-generator
that referenced
this pull request
Feb 27, 2019
* Restore support for nullable in rust-server Accounts for changes in OpenAPITools#930. Adds a nullable field to the sample to reduce the risk of this regressing again in future. * Add test for required nullable field
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
As discussed #889 (comment), the implementation proposed in #889 needs to be adapted.
Swagger-Parser is doing the conversion from
x-nullable
OASv2 tonullable
OASv3.See an example in swagger-api/swagger-parser#810.
This PR removes reading
x-nullable
extension from our code, because the extension will only be available in OASv3. In v3 having them make no sense as pointed out by @wing328.There is still an open issue: swagger-api/swagger-parser#820 to have the formData parameter handled in swagger. I added a reference in near to the commented unit-test.