Skip to content
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 nullable property support from OAS 3.0 spec #8809

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

cognifloyd
Copy link

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./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\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language. not applicable as this is generic support for an OAS 3.0 spec feature

Description of the PR

Add nullable to CodegenProperty to allow code generators to support the nullable property in the 3.0.0, 3.0.1, and 3.0.2 specs.

Possibly Related: #2885, #4262, #6872, #7013, #7600, #8161, #8710

cognifloyd added a commit to cognifloyd/swagger-codegen-generators that referenced this pull request Oct 13, 2018
cognifloyd added a commit to cognifloyd/swagger-codegen-generators that referenced this pull request Oct 13, 2018
@cognifloyd
Copy link
Author

cognifloyd commented Oct 13, 2018

I wasn't sure which samples to run because this is language agnostic and no language has support yet, so I ran several. Then, I wasn't sure if I needed to commit the changes to the various samples.
I'd be happy to drop all but c5ef731 as all of the samples are cluttering this PR. dropped

@cognifloyd
Copy link
Author

cognifloyd commented Oct 13, 2018

If you want to see the regenerated samples look here: 270035f eaa76fb 9c8b378
I'm dropping them.

Also, I just noticed some changes from openapi-generator. Apparently I neglected to add nullable to parameter.
Relevant changes:

I will add a similar change to parameter as well, and reference the author in the commit message.

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
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 cognifloyd changed the title Add nullable property support Add nullable property support from OAS 3.0 spec Oct 13, 2018
@HugoMario HugoMario merged commit d46ba8b into swagger-api:3.0.0 Dec 19, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants