-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[TS][Fetch] Add possibility to pass baseOptions to the API Configuration #642
Conversation
…ll be passed to every fetch call
hm the shippable job timed out, do you have any tips / insights on this? |
Hi @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny, any question/feedback on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply!
Changes look good to me.
Some of the regenerated samples have some weird changes, which were not introduced in this PR (see other comment).
@@ -17,7 +17,7 @@ import * as url from "url"; | |||
import * as portableFetch from "portable-fetch"; | |||
import { Configuration } from "./configuration"; | |||
|
|||
const BASE_PATH = "https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r".replace(/\/+$/, ""); | |||
const BASE_PATH = "http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r".replace(/\/+$/, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change intentional? It was not changed in this PR. Seems like someone didn't regenerate the samples in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes seems like they were not regenerated before, honestly i don't know much about it, it changed after executing the sample binaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
@dsumer thanks for the contribution, which has been merged into master. @macjohnny @TiFu thanks for reviewing the change. |
@dsumer thanks for the enhancement, which is included in the v3.2.2 stable release: https://twitter.com/oas_generator/status/1032252335131512832 |
…ll be passed to every fetch call (OpenAPITools#642)
…ll be passed to every fetch call
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.2.x
,4.0.x
. Default:master
.@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01)
Description of the PR
add possiblity to pass baseOptions to the API Configuration, which will be passed to every fetch call
useful to pass e.g. { credentials: 'include' } as baseOptions and don't have to pass it to every single API call