-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add index.html and missing 'dist' files to npm package #1490
Comments
Note that we offer two packages, one of them is swagger-editor-dist. |
Hi @pofallon! As @webron mentioned, we maintain two different npm modules for the project, in order to support two very different use cases. I'll try to give some more context... The If you want to use Swagger Editor indirectly, say by having a Node project open a browser window to the static |
Thanks for the replies, the context, and the pointer to I think my use case trends towards the latter, so |
Hmmm - I see that from my end too. That's an oversight on our part, probably stemming from the fact that we borrowed the dist package's build script from Swagger-UI - for legacy reasons, I'll open a PR that fixes that today, which should go live when we release a new version on Friday. In the meantime, you should be able to safely copy the |
Awesome, thanks very much! |
yarn add swagger-editor
Demonstration API definition
n/a
Configuration (browser query string, constructor, config.yaml)
n/a
Expected Behavior
The npm package should contain the necessary files to load the Swagger Editor in a browser. In other words, if I add
swagger-editor
as a node.js dependency in my project, I should be able to load the swagger-editor index.html file and have the editor render correctly.Current Behavior
Currently the npm package contains:
However, cloning the repo and running
npm run build
yields several more files indist
:Possible Solution
Adding the missing
dist
files above, along withindex.html
from the root of the project, should enable someone to add this project as a dependency and correctly render the swagger editor.Context
I'd like to provide an easy way for my developers to add the swagger editor as a "dependency" of their Swagger JSON project and fire up a local editor to manipulate their API definition.
The text was updated successfully, but these errors were encountered: