Forum Discussion
Hi,
Firstly welcome to the community!
Can you provide a worked example of what you are trying to do please?
From the title I assume you are trying to use inspector to quickly get a swagger/oas def from an existing API.
SmartBear have done a great intro using one of my favourite auth free APIs - SWAPI.co (Startwars API)
https://swagger.io/blog/api-development/how-to-perform-a-basic-api-test/
If you make calls to the API with inspector and have a swaggerhub account you can push your URIs and responses over to give you a leg up to documenting the API.
- madcatzx5 years agoOccasional Contributor
Well:
I have an existing API.
I have have documented it on Swagger Hub.
Now I want to generate documentation for an end user.
That documentation MUST have examples of responses (e.g.: depending on success or fail of an API call, response will be different, an so on...).
So I would like to use existing documentation from Swagger Hub, that has URI in it, to call an API endpoints, get a responses and generate final, full documentation, using Swagger Hub.
- alex-savage5 years agoOccasional Contributor
Have you included examples in your schemas ? If include this and the auto mocking is enabled then they will see those responses in the "try it out" and the example sections on the docs. See this post https://community.smartbear.com/t5/SwaggerHub/What-is-benefit-of-virtserver-swaggerhub-com-GET/m-p/199886#M1062
If you want to make customer facing docs have you tried Re-doc? that is able to take a OAS def and make a pretty good looking static docs site from it.
- madcatzx5 years agoOccasional Contributor
HI,
Yes I have an examples, I made some.
But currently, I have to document 20+ endpoints, that are working, so I can get an example of response by calling them directly. So that would save time on organizing response, then copying. That would be non error prone, also time consuming.
So I want to call existing API and simply save response.
Is it possible with swagger?
Related Content
- 3 years ago
- 4 years ago
Recent Discussions
- 15 days ago
- 2 months ago