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

Allow passing baseURL to Swagger.exeute method. #3537

Closed
sauravazad opened this issue May 27, 2024 · 4 comments
Closed

Allow passing baseURL to Swagger.exeute method. #3537

sauravazad opened this issue May 27, 2024 · 4 comments
Assignees
Labels
P2 pull-request-welcome That the core team don't have the resources, but would welcome a community PR type: enhancement

Comments

@sauravazad
Copy link
Contributor

Content & configuration

Swagger-Client usage:

SwaggerClient.execute({
 baseURL: 'someURL'
})

Is your feature request related to a problem?

baseURL is computed every time when an execute is invoked .

export function baseUrl(obj) {

Please have a look at below flame chart .
Building the URL consumes almost 75% of execution time for the executeClient method .
image

Describe the solution you'd like

If SwaggerClient.execute() were to accept a baseURL , and use it if provided instead of building it , It would help in improving the performance and execution time .

Please let me know if this added support is acceptable . If so, I will raise a PR to add the support.

@sauravazad sauravazad changed the title Allow passing baseURL for Swagger.exeute . Allow passing baseURL to Swagger.exeute method. May 27, 2024
sauravazad pushed a commit to sauravazad/swagger-js that referenced this issue May 27, 2024
@sauravazad
Copy link
Contributor Author

@char0n

Any comments or thought on the above proposal ?

@ponelat ponelat added P2 type: enhancement pull-request-welcome That the core team don't have the resources, but would welcome a community PR labels Oct 18, 2024
@char0n
Copy link
Member

char0n commented Oct 18, 2024

Hi @sauravazad,

The proposal is reasonable. We're gonna go for it. I'll tend the the PR ASAP.

Thank you!

char0n added a commit that referenced this issue Nov 7, 2024
Refs #3537

Co-authored-by: Saurav Azad <[email protected]>
Co-authored-by: Vladimír Gorej <[email protected]>
@char0n
Copy link
Member

char0n commented Nov 7, 2024

Addressed in #3538

@char0n char0n closed this as completed Nov 7, 2024
@char0n char0n self-assigned this Nov 7, 2024
swagger-bot pushed a commit that referenced this issue Nov 7, 2024
# [3.31.0](v3.30.1...v3.31.0) (2024-11-07)

### Features

* **execute:** add support for baseURL override ([#3538](#3538)) ([1e3d882](1e3d882)), closes [#3537](#3537)
@char0n
Copy link
Member

char0n commented Nov 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 pull-request-welcome That the core team don't have the resources, but would welcome a community PR type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants