swagger-editor
swagger-editor copied to clipboard
Open custom yaml spec in swagger editor on startup
I want to customize the default petstore yaml which gets opened whenever I open swagger editor.
Is there a way to customize it so that I can open a different swagger yaml spec whenever I open swagger editor.
Yes!
You can use Swagger-UI's config options to load in your own definiton: there's url for fetching a remote document, and spec for passing in a JavaScript object directly. Swagger-Editor passes these options directly to its underlying Swagger-UI instance.
More info here: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#core