A simple to use swaggerdiff api based on SwaggerDiff To be used for backwards compatibility checks or similar for your apis.
The Docker image is about 110MB
The api is located on port 80 and has one endpoint
/diff
the diff endpoint takes a POST request with a simple body
{
"old": "",
"new": ""
}
where old, is the old previous spec and new is the.. you guessed it.. new spec.
{
"old": "https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/json/petstore-expanded.json",
"new": "https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/json/petstore-minimal.json"
}
old and new can either be a uri to the swagger.json or the actual swagger.json.
The api response looks like the following
{
"errors": [],
"warnings": [],
"infos": [],
"unmatchDiffs": []
}
containing the rules "broken". See the How it works in the swagger-diff docs
NodeJS
git clone https://github.com/VisualBean/SwaggerDiffApi.git
npm install
npm start
Profit! 🎉
.\build.ps1
bash build.sh
docker run -p 80:80 -d swagger-diff-api
The api is now available at http://localhost/diff
- Express - Node Server
- SwaggerDiff - SwaggerDiffer
- Nodemon - For hot-reload
- NodeJS
- Alex Steinhauer-Wichmann
This project is licensed under the MIT License - see the LICENSE.md file for details