0.1.3 • Published 2 years ago

swagger-rm-example v0.1.3

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years ago

swagger-rm-example Build Status

Purpose

The purpose of this library is to avoid errors that occur when importing a swagger file into Amazon API Gateway like below.

errors : [Invalid model schema specified. Unsupported keyword(s): ["example"]]

Usage

This library require npm. If npm has already been installed, you can install the library with the following command.

npm install swagger-rm-example

Please call the library as following.

// import package
const fs = require('fs');
const swaggerRmExample = require('swagger-rm-example');

// read yaml file
const inputFile = "./swagger.yaml";
const inputStr = fs.readFileSync(inputFile, 'utf8');

// remove example from string
const outputStr = swaggerRmExample.removeExample(inputStr);

// display result
console.log(outputStr);

Development

If you edit this project, you can clone it from the repository and build the development environment with the following command.

# Install required packages
npm install

# Run the test
npm test
0.1.3

2 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago