jhthorsen / openapi-client

A client for talking to an Open API powered server
11 stars 17 forks source link

Allow passing server uri to constructor #14

Closed autarch closed 6 years ago

autarch commented 6 years ago

It'd be really nice to support passing the server's URI to the constructor. As it stands it's pretty challenging to use this code against a test server running locally. I have to munge the swagger file to inject the proper host into it.

autarch commented 6 years ago

Then I realized this already works. Oops.

jhthorsen commented 6 years ago

Does this mean that the documentation need some improvement?

autarch commented 6 years ago

I think some doc improvements couldn't hurt. This is covered in a section entitled "Customization", which isn't a great title. I think it'd also be nice if you could just pass this to the constructor.

jhthorsen commented 6 years ago

What do you think about the change in 09c80ed?

autarch commented 6 years ago

That's not bad, but I think an explicit section on the constructor and the options it can accept would also be useful.

jhthorsen commented 6 years ago

I welcome a PR or a snippet in this issue about how to make it better!