I've downloaded the Swagger-UI source and in the docs, it talks about being able to host it in any server environment. I would like to host it with our APIs themselves and am wondering how I reference my swagger.json file such that it's relative to the Swagger-ui /dist dir that I plan to host as part of our application, which will flow through our deployment process and be hosted on varying different host names...so I won't have a pre-defined URL that hosts my swagger.json file, I'd like to access it relative to the /dist dir.
So for example, say I have a restful API like this {host}/v1/pets, and I want to host a way for clients to view my swagger.json with swagger-ui with this url: {host}/v1/api-view. I can easily include the swagger-ui /dist directory in our deployments such that it'll respond to requests for the /v1/api-view path. So my two questions are:
1) Where should I put the swagger.json I just generated from the online Swagger Editor?
2) How do I reference that relative location in the /dist/index.html?
I've tried several combinations and only generate errors like this:
Please specify the protocol for file://localhost/Users/me/Desktop/swagger-ui-master/dist/index.html/swagger.json
Thanks,
Peter Luttrell