ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
115 stars 66 forks source link

Browser support not working as expected #74

Open ghandic opened 2 years ago

ghandic commented 2 years ago

I followed the steps to clone, npm install, and then npm build. This generates a min.js file. However, when I add this to a script tag and then try to call OpenAPISnippet I get

OpenAPISnippet
VM438:1 Uncaught ReferenceError: OpenAPISnippet is not defined
    at <anonymous>:1:1
ghandic commented 2 years ago

It is now working, unsure what my issue was... Do you guys plan to publish to a CDN? I'm integrating this into FastAPI and would like the ease of using a CDN to get the javascript

ghandic commented 2 years ago

@ErikWittern is there any chance we could get this build and pushed to https://www.jsdelivr.com similar to how the swagger-ui-bundle is https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-bundle.js

syedzahed commented 8 months ago

Its not OpenAPISnippet. Add 's' to its exported as OpenAPISnippets