This PR adds boilerpate allowing the creation of Swagger documentation via the swagger-ui-express dependency.
The first endpoint im adding is /api/v2/auto-experiments which allows the querying and filtering of auto-experiments
How it works
nomad-rest-api/app.js: Has a new object called swaggerDocument this object documents the api and is used to generate the Swagger docs. For each path, an object which defines the api of that path is added. I'm defining these objects in controlers/v2/auto-experiments.js so that the documentation object is next to the function it is documenting.
new endpoint /api-docs where you can view the swagger documentation -- see image below
nomad-rest-api/contorllers/auth.js - ive added a documentation boject for the auth endpoint so that it appears in the swagger docs
This PR adds boilerpate allowing the creation of Swagger documentation via the
swagger-ui-express
dependency.The first endpoint im adding is
/api/v2/auto-experiments
which allows the querying and filtering ofauto-experiments
How it works
nomad-rest-api/app.js
: Has a new object calledswaggerDocument
this object documents the api and is used to generate the Swagger docs. For each path, an object which defines the api of that path is added. I'm defining these objects incontrolers/v2/auto-experiments.js
so that the documentation object is next to the function it is documenting./api-docs
where you can view the swagger documentation -- see image belownomad-rest-api/contorllers/auth.js
- ive added a documentation boject for the auth endpoint so that it appears in the swagger docs- ive added enpoints for
/api/v2/auto-expeirmentsand
/api/v2/auto-experiments/download`