https://github.com/shockey/swagger-ui-plugin-cornify
Cornify plugin for Swagger-UI v3
https://github.com/shockey/swagger-ui-plugin-cornify
rainbows swagger swagger-ui unicorns
Last synced: 3 months ago
JSON representation
Cornify plugin for Swagger-UI v3
- Host: GitHub
- URL: https://github.com/shockey/swagger-ui-plugin-cornify
- Owner: shockey
- License: mit
- Created: 2017-10-26T01:57:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-27T22:22:47.000Z (over 7 years ago)
- Last Synced: 2025-03-12T14:16:37.506Z (3 months ago)
- Topics: rainbows, swagger, swagger-ui, unicorns
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/swagger-ui-cornify)
# swagger-ui-cornify
Cornify plugin for Swagger-UI v3.
This is a lighthearted example of how to create an external plugin for Swagger-UI. This project has a minimal Webpack build pipeline that creates bundles for browser consumption.
The plugin is available on npm as `swagger-ui-cornify`, and minified release copies are attached to each [GitHub Release](https://github.com/shockey/swagger-ui-cornify/releases).
If you use the script directly, the module will be exposed on the global scope as `SwaggerUICornify`.
### How to use
Load this plugin (either through npm or directly), and provide it to Swagger-UI when you call it:
```js
SwaggerUI({
url: "http://petstore.swagger.io/v2/petstore.yaml",
plugins: [
SwaggerUICornify
]
})
```If/when the API definition you're viewing contains an `x-cornify: true` statement, magic will happen.
### In action
Before:

After:
