pyramid_swagger icon indicating copy to clipboard operation
pyramid_swagger copied to clipboard

Serving API explorer

Open ergo opened this issue 6 years ago • 5 comments

Hi, per previous discussion I've created a PR that provides /api-explorer URL that serves Swagger UI using locally served spec files. Right now it uses CDN to serve most of static files to keep pyramid_swagger as small as possible, however template code is ready for local static file serving if needed (I used that first before I got the idea to use CDN).

https://github.com/striglia/pyramid_swagger/pull/226 PR adding the functionality.

ergo avatar Mar 11 '18 19:03 ergo

Hello, can someone look at this PR? I will need this functionality in my project soon and it would be great if we had a new release with the code if possible.

Thanks.

ergo avatar Mar 14 '18 22:03 ergo

Hey @ergo thanks for your patience. The PR isn't as complicated (or heavyweight) as I had feared, so it may be cause for more optimism than I showed in #225. Let me poke around on that PR and see if we can work a good compromise out.

striglia avatar Mar 15 '18 00:03 striglia

Sure @striglia, I looked at the code and I've used CDN by default, but left static urls intact in the code, but now that I think of it - it might make sense to actually add the dist css/js files back into the PR, and maybe make CDN optional via flag.

I can imagine that someone could be using the package behind firewall/intranet - then the page would not render correctly. I left the files out of PR to make it smaller because I was not sure whats your position on this.

ergo avatar Mar 15 '18 01:03 ergo

Bump, any news on this?

ergo avatar Apr 04 '18 21:04 ergo

@sjaensch @macisamuele @djeebus any thoughts here? Honestly i'm on the fence about whether the added complexity is best put in a separate, orthogonal package or included inside pyramid_swagger.

striglia avatar Apr 24 '18 17:04 striglia