arjun-g / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.
MIT License
170 stars 47 forks source link

Simplify the package by using the swagger-ui-dist npm package #36

Closed Raptor399 closed 6 years ago

Raptor399 commented 6 years ago

It's not good practice to copy dependency files into your own project - case in point: the swagger-ui files. This change adds a swagger-ui-dist dependency to the package.json, which should make VS Code download and install the required swagger-ui files to the "node_modules/swagger-ui/" directory.

To be able to reach those files, the local server now points to the top directory. Two HTML files were moved to keep http://localhost:9000 working as before, and the static directory with all of its duplicate code was deleted.

For local testing purposes, use npm install to download the swagger-ui files before testing.

arjun-g commented 6 years ago

There is little problem with this change. The node_modules folders is not marked as static folder in express. Anyhow I am merging it and will fix it from my side.