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

[typescript-fetch] Add nullable support #3645

Merged
merged 1 commit into from
Aug 15, 2019

Conversation

aiham
Copy link
Contributor

@aiham aiham commented Aug 15, 2019

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, ./bin/openapi3/{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\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Similar to #1730 and #1743 adding support for nullable in the typescript-fetch client.

CC @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07)

@auto-labeler
Copy link

auto-labeler bot commented Aug 15, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@aiham
Copy link
Contributor Author

aiham commented Aug 15, 2019

I ran ./bin/typescript-fetch-petstore-all.sh and ./bin/openapi3/typescript-fetch-petstore-all.sh as instructed in the checklist, but it made a bunch of unrelated changes. Are you sure you want them in this PR?

$ git diff --cached --stat
 samples/client/petstore/typescript-fetch/builds/default/src/apis/PetApi.ts                   | 20 ++++++++++----------
 samples/client/petstore/typescript-fetch/builds/default/src/apis/StoreApi.ts                 |  8 ++++----
 samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts                  | 32 ++++++++++++++++----------------
 samples/client/petstore/typescript-fetch/builds/default/src/models/InlineObject.ts           | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/default/src/models/InlineObject1.ts          | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/default/src/models/index.ts                  |  2 ++
 samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts                | 20 ++++++++++----------
 samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts              |  8 ++++----
 samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts               | 32 ++++++++++++++++----------------
 samples/client/petstore/typescript-fetch/builds/es6-target/src/models/InlineObject.ts        | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/es6-target/src/models/InlineObject1.ts       | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/es6-target/src/models/index.ts               |  2 ++
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/PetApi.ts           | 20 ++++++++++----------
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/StoreApi.ts         |  8 ++++----
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts          | 32 ++++++++++++++++----------------
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/InlineObject.ts   | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/InlineObject1.ts  | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/with-interfaces/src/models/index.ts          |  2 ++
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts          | 20 ++++++++++----------
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts        |  8 ++++----
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts         | 32 ++++++++++++++++----------------
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/InlineObject.ts  | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/InlineObject1.ts | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/index.ts         |  2 ++
 24 files changed, 544 insertions(+), 120 deletions(-)

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@macjohnny
Copy link
Member

please just run ./bin/typescript-fetch-petstore-all.sh und commit the changes. please run mvn clean package before generating the samples, and also make sure to be based on the most recent master.

@macjohnny
Copy link
Member

I guess the samples should not change, as the fields in the petstore demo are not marked as nullable

@aiham
Copy link
Contributor Author

aiham commented Aug 15, 2019

please just run ./bin/typescript-fetch-petstore-all.sh und commit the changes. please run mvn clean package before generating the samples, and also make sure to be based on the most recent master.

Okay just running that first script results in no changes. Thanks

@macjohnny macjohnny merged commit 2d7785a into OpenAPITools:master Aug 15, 2019
@macjohnny
Copy link
Member

thanks for your PR

@macjohnny macjohnny added this to the 4.1.1 milestone Aug 15, 2019
@aiham aiham deleted the ts-fetch/support-nullable branch August 16, 2019 21:01
@wing328
Copy link
Member

wing328 commented Aug 26, 2019

@aiham thanks for the PR, which has been included in the v4.1.1 release: https://twitter.com/oas_generator/status/1165944867391860737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants