-
-
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
[TypeScript-Node] support setting the content-type header per-call #1868
Conversation
This approach is inspired by the typescript-fetch implementation in swagger-codegen. Fixes #1867
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) |
modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
Show resolved
Hide resolved
…pi-single.mustache Co-Authored-By: silasbw <[email protected]>
…pi-single.mustache Co-Authored-By: silasbw <[email protected]>
@macjohnny applied your suggestions, ty. About naming |
@silasbw ok, using |
@silasbw thanks for the PR, which has been merged into master. Is it correct to say that this is a breaking change (without fallback) as I saw the changes in the method signature? |
I don't think it's breaking, because the change includes a default value for argument it adds to the function signature.. |
@silasbw 👌 thanks for the explanation. |
…penAPITools#1868) * [TypeScript-Node] support setting the content-type header per-call This approach is inspired by the typescript-fetch implementation in swagger-codegen. Fixes OpenAPITools#1867 * Update modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache Co-Authored-By: silasbw <[email protected]> * Update modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache Co-Authored-By: silasbw <[email protected]> * Update Petstore sample * Fix types * update "npm" petstore example * Rename
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
,. Default:3.4.x
,4.0.x
master
.Description of the PR
This approach is inspired by the typescript-fetch implementation in swagger-codegen.
Fixes #1867