1.0.0 • Published 3 years ago

swagger-ui-plugin-wip-operation v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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"