Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Latest commit

 

History

History

swagger-ui-custom-layout

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@dsaidgovsg/swagger-ui-custom-layout

This is a custom layout plugin for Swagger UI.

Prerequisites

Install

Add github npm registry to .npmrc,

# .npmrc
always-auth = true
@dsaidgovsg:registry=https://npm.pkg.github.com

Install the package,

$ npm install @dsaidgovsg/swagger-ui-custom-layout

Usage

import customLayoutPlugin from '@dsaidgovsg/swagger-ui-custom-layout'

// swagger-ui initialization
  SwaggerUI({
    plugins: [
      customLayoutPlugin,
      ...
    ],
    // specify layout name
    layout: 'ProductLayout'
  })