How I can see UI format of Generated Swagger JSON

Hello,

I have installed the swagger module and it’s generating Swagger JSON of API.

But my question is how API developer can see my document as public users. For the example of a pet.
https://petstore.swagger.io/

Do we have this feature in the swagger module?
Or Any suggestion on how I can make my swagger doc like https://petstore.swagger.io/ for public use?

Hello. You can download Swagger UI and place it within your project.

https://swagger.io/tools/swagger-ui/

For a quick implementation, I would suggest trying the plain HTML route (the directions are at the bottom of this link)

Once you have that in your site (maybe in the resources folder or wherever makes sense for you), just update the Swagger path in the index.html file to point to your Swagger JSON

url: “/cbswagger”,

If you see any errors, make sure that the Swagger file is able to load properly. Thanks!

-Daniel

1 Like

Thanks for the good suggestion. I was thinking this module supporting UI as well.