4.1.2 • Published 2 years ago

swagger-ui-plugin-enum-names v4.1.2

Weekly downloads
11
License
Apache-2.0
Repository
github
Last release
2 years ago

swagger-ui-plugin-enum-names

image

A plugin for Swagger UI to show x-enum-varnames / x-enumNames and x-enum-descriptions.

x-enum-varnames/x-enum-descriptions are supported by openapi-generator (docs).
Also x-enumNames is supported by NSwag (docs).

Usage

With npm

$ npm i swagger-ui-plugin-enum-names

Pass this plugin to options.

const { EnumNamesPlugin } = require('swagger-ui-plugin-enum-names')

SwaggerUI({
  plugins: [
    EnumNamesPlugin
  ]
})

And import swagger-ui-plugin-enum-names/dist/index.css in some way.

With unpkg

<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-plugin-enum-names/dist/index.css" />

<script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"></script>
<script src="https://unpkg.com/swagger-ui-plugin-enum-names"></script>

<script>
window.onload = () => {
  SwaggerUIBundle({
    plugins: [
      EnumNamesPlugin.EnumNamesPlugin
    ]
  })
}
</script>
4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

2.0.0-beta.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago