Skip to content

SensibleWood/swaggerui-webpack-boilerplate

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

Overview

This is boilerplate project for running Swagger UI with Webpack. It exists because:

  • I wanted an easy way of slamming multiple API specifications into a Swagger UI-based project and running it locally.
  • I didn't wanted to manually change the Javascript every time I added an API specification.
  • Using NPM/Webpack means my dependencies can be kept up-to-date easily.

Sure there's other ways of doing this, but still...

There's also a Redoc page - although this is CDN-based as I am lazy. I removed the Redoc version for the time being.

Usage

To use this project clone and cd into it then:

npm i
cp [your Swagger/OpenAPI specifications as YAML] src/specs
npm run dev

👍

Improvements

  • Parameterise API specification document name.
  • Refactor scripts/rewrite-urls.js as a Webpack plugin.

About

Boilerplate for spinning up local Swagger UI server, orchestrated through Webpack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published