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

[TS][Fetch] Add possibility to pass baseOptions to the API Configuration #642

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

dsumer
Copy link
Contributor

@dsumer dsumer commented Jul 25, 2018

…ll be passed to every fetch call

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: master, 3.2.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

@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

@dsumer
Copy link
Contributor Author

dsumer commented Jul 25, 2018

hm the shippable job timed out, do you have any tips / insights on this?

@wing328 wing328 added this to the 3.2.0 milestone Jul 28, 2018
@wing328 wing328 changed the title add possiblity to pass baseOptions to the API Configuration, which wi… add possiblity to pass baseOptions to the API Configuration, which will be passed to every fetch call Jul 28, 2018
@wing328
Copy link
Member

wing328 commented Aug 5, 2018

Hi @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny, any question/feedback on this PR?

Copy link
Contributor

@TiFu TiFu left a 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(/\/+$/, "");
Copy link
Contributor

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?

Copy link
Contributor Author

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

@wing328 wing328 modified the milestones: 3.2.0, 3.2.1 Aug 6, 2018
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.

looks good to me

@wing328 wing328 modified the milestones: 3.2.1, 3.2.2 Aug 14, 2018
@wing328
Copy link
Member

wing328 commented Aug 21, 2018

@dsumer thanks for the contribution, which has been merged into master.

@macjohnny @TiFu thanks for reviewing the change.

@wing328 wing328 merged commit 450d624 into OpenAPITools:master Aug 21, 2018
@wing328 wing328 changed the title add possiblity to pass baseOptions to the API Configuration, which will be passed to every fetch call [TS][Fetch] Add possibility to pass baseOptions to the API Configuration Aug 21, 2018
@wing328
Copy link
Member

wing328 commented Aug 22, 2018

@dsumer thanks for the enhancement, which is included in the v3.2.2 stable release: https://twitter.com/oas_generator/status/1032252335131512832

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
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.

None yet

4 participants