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

Open
sauravazad opened this issue May 27, 2024 · 2 comments
Open

Allow passing baseURL to Swagger.exeute method. #3537

sauravazad opened this issue May 27, 2024 · 2 comments
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

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
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!

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