JSPM

swagger-ui-plugin-wip-operation

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q18784F
  • License ISC

Swagger-ui plugin to visually flag some operation as WIP

Package Exports

  • swagger-ui-plugin-wip-operation

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swagger-ui-plugin-wip-operation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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"