Forum Discussion
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.
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?
- alex-savage5 years agoOccasional Contributor
SwaggerInspector (https://inspector.swagger.io/) will let you call an existing API, save the responses to move them into an OAS definition. Give it a try with your or a simple API and see how you get on.
- madcatzx5 years agoOccasional Contributor
I know this in theory, as title of this post is saying: Integration between Hub and Inspector.
Is there any tutorial or some documentation on this exact thing?
Because I couldn't manage to save response with inspector and import it back to Swagger HUB.
Related Content
- 3 years ago
- 4 years ago
Recent Discussions
- 15 days ago
- 2 months ago