Skip to content

Adds default settings for the generated Swagger ruby client #761

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

Closed
wants to merge 1 commit into from
Closed

Adds default settings for the generated Swagger ruby client #761

wants to merge 1 commit into from

Conversation

csaunders
Copy link

I was having a bit of pain when first using the generated client, though
I'm not entirely sure if this is the correct approach. I just noticed that
when trying to make API requests I needed to call Swagger.configure before
things would work, but then it would attempt to call the pets API instead of
my API that I had just conusmed to generate the client.


This is just something that I observed while using the generated Ruby client. I see that you can pass in a block to Swagger.configure though much of the work there seems counter to the reason behind generating an API client.

A concern I have with this approach is that it could result in some clobbering if an application is using multiple swagger clients. Perhaps the generated swagger clients should be name spaced to the API they are wrapping to protect against that?

I'd love to hear your thoughts.

I was having a bit of pain when first using the generated client, though
I'm not entirely sure if this is the correct approach. I just noticed that
when trying to make API requests I needed to call `Swagger.configure` before
things would work, but then it would attempt to call the pets API instead of
my API that I had just conusmed to generate the client.
@wing328
Copy link
Contributor

wing328 commented May 19, 2015

@csaunders there's PR to organize the Ruby code into a module #662. Would that address or alleviate your concern ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants