The purpose of this library is to avoid errors that occure when importing a swagger file into Amazon API Gateway like below.
errors : [Invalid model schema specified. Unsupported keyword: ["example"]]
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 packageconst fs = ;const swaggerRmExample = ;// read yaml fileconst inputFile = "./swagger.yaml";const inputStr = fs;// remove example from stringconst outputStr = swaggerRmExample;// display resultconsole;
If you edit this project, you can clone it from the repository and build the development environment with the following command.
# Install required packagesnpm install# Run the testnpm test