Skip to content
Enrich your OpenAPI 3.0 JSON with code samples
Branch: master
Clone or download
Andrzej WP
Latest commit 8ac024d Nov 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Nov 9, 2019 amend README with yaml usage Nov 10, 2019
cdwv-logo-new.svg add cdwv logo Nov 10, 2019
image.png Add ReDoc screenshot Nov 10, 2019
index.js provide YAML support Nov 10, 2019
package.json provide YAML support Nov 10, 2019

Enrich your OpenAPI 3.0 schema with examples

Thanks to the wonderful swagger-snippet module you can now simply enrich your OpenAPI schema with code samples. It's as easy as 1.2.3.

  1. Clone this repo
  2. npm install
  3. node index.js your_oas.json

Example Usage

Clone this repo

git clone

Install NPM packages

npm install

Enrich your OAS 3.0 Schema!

node index.js openapi.json > openapi-with-examples.json

Alternatively you can point it to a YAML-formatted spec:

curl --output petstore.yaml
node index.js petstore.yaml > openapi-with-examples.json

Use ReDoc to build beautiful API doc:

redoc-cli bundle openapi-with-examples.json


ReDoc API documentation with code samples


Contributions are most welcome!




Project is currently maintained, in our spare time, by and a growing number of Contributors!

You can’t perform that action at this time.