icyleaf / swagger

Swagger contains a OpenAPI / Swagger universal documentation generator and HTTP server handler.
MIT License
41 stars 10 forks source link

Use git submodule/subtree for Swagger UI? #6

Closed j8r closed 4 years ago

j8r commented 4 years ago

Swagger UI is an entirely other project than this Crystal onel. It would be better to use git module/subtree to easily update the files, instead of vendoring the JS/CSS files. It would also keep the history.

In my opinion, the whole Swagger HTTP server can even be an new Crystal project, based on this shard (but I agree it can be practical to have it here).

j8r commented 4 years ago

The "damage" is done, having this assets in this repos make it weight a lot more that only Crystal source code.

In fact @icyleaf , it isn't even needed to have them: we can use the resources from https://petstore.swagger.io/ like https://petstore.swagger.io/swagger-ui-bundle.js and https://petstore.swagger.io/swagger-ui.css

icyleaf commented 4 years ago

I am working on it by using jsdelivr cdn source.

j8r commented 4 years ago

@icyleaf I just noticied there is an official unpkg available: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/installation.md#unpkg

icyleaf commented 4 years ago

jsDelivr has global CDN networks include China.