swagger-ui-plugin-wip-operation

1.0.0 • Public • Published

Introduction

This Swagger-UI plugin allows to mark some path operation as still Work In Progress.

It works by wrapping the operation component with a div and applying custom CSS.

Installation

npm i swagger-ui-plugin-wip-operation

Usage

Add the plugin in the configuration object of SwaggerUI, and provides a list of sections like this :

import { WipOperationPlugin } from 'swagger-ui-plugin-wip-operation';

SwaggerUI({
  // ...
  plugins: [
    WipOperationPlugin
  ]
})

To mark an operation as WIP, you just have to add x-wip: true field on your OpenAPI spec :

openapi: "3.0.1"
# ...
paths:
  /my-wip-endpoint:
    get:
      x-wip: true
      summary: "An endpoint still in specification"
      responses:
        "200":
          description: "Successful operation"

Readme

Keywords

Package Sidebar

Install

npm i swagger-ui-plugin-wip-operation

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

3.08 kB

Total Files

4

Last publish

Collaborators

  • m.barre
  • d.villeneuve
  • treviller
  • cguino