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
Example for dynamic client? #996
Comments
What would you expect from a dynamic client? |
Thanks for taking the time to ask. If I have the swagger spec file for an existing 3rd party REST service for their application, a dynamic client would allow me to load the swagger spec file and provide the ability to formulate requests and parse responses based on the loaded spec file. For e.g. there are REST client packages for go like go-resty that provide a nice interface to interact with a REST server, but go-resty doesn't comprehend swagger specs. |
Adding a bit more context, can I get the rest client functionality without first generating a client using go-swagger and then compiling it back into the code. Can this be done dynamically like the dynamic server example. |
I think I still don't fully understand the use case because you'd have to do everything the code generator does for you by hand. Every time the API changes you have to do this again. That being said you might find this test useful as an example: |
Problem statement
Just like the untyped dynamic server example in go-swagger, is there an example for a dynamic client. Can a REST client be created at runtime by loading a swagger spec file, without going through a code generation and compilation? Thanks.
The text was updated successfully, but these errors were encountered: