Skip to content

[typescript-axios]: Check configuration is defined in api.ts so it compiles with strict flag#7892

Merged
macjohnny merged 2 commits intoOpenAPITools:masterfrom
therockstorm:json-mime
Nov 9, 2020
Merged

[typescript-axios]: Check configuration is defined in api.ts so it compiles with strict flag#7892
macjohnny merged 2 commits intoOpenAPITools:masterfrom
therockstorm:json-mime

Conversation

@therockstorm
Copy link
Copy Markdown
Contributor

@therockstorm therockstorm commented Nov 6, 2020

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @topce @akehir @petejohansonxo @amakhrov

@auto-labeler
Copy link
Copy Markdown

auto-labeler Bot commented Nov 6, 2020

👍 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.

: nonString;
localVarRequestOptions.data = needsSerialization
? JSON.stringify({{paramName}} !== undefined ? {{paramName}} : {})
: ({{paramName}} || "");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixes errors like,

api.ts:3644:9 - error TS2532: Object is possibly 'undefined'.

3644         configuration.isJsonMime(
             ~~~~~~~~~~~~~

@therockstorm
Copy link
Copy Markdown
Contributor Author

@macjohnny Could I get the first check kicked off again? Seems unrelated to my change.

Copy link
Copy Markdown
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 macjohnny added this to the 5.0.0 milestone Nov 9, 2020
@macjohnny macjohnny merged commit 81e0e8d into OpenAPITools:master Nov 9, 2020
@therockstorm therockstorm deleted the json-mime branch November 9, 2020 20:04
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.

2 participants