-
Notifications
You must be signed in to change notification settings - Fork 42
Swagger
-
Swagger is a way for developers to test their api endpoints, and also acts as a documentation center for API's created.
-
It allows software engineers to save time on documentation as much of it is auto generated
-
It's comprehensible for developers and non-developers. Anyone can have input into the design of the API, because it is clearly mapped in a user-friendly UI.
-
It's easily adjustable. This makes it great for testing and debugging API problems.
Upon starting up the WebApiBackend, the swagger interface will open up in the browser automatically, and you will be presented with a similar looking page.
Since every api endpoint is authorised (besides user), in order to test the endpoints in swagger you will first have to obtain a JWT token otherwise all requests will result in a 401 unauthorised error. This can be done by logging in through the log in endpoint and entering a correct username/password in the body.
You will receive a response body which contains the JWT token which can be used to authenticate
Once the JWT token is obtained, click the authorise button
And then enter Bearer
e.g. Bearer eyJhbGciOiJIUzI1NiI...
Now all endpoints should be accessible
- Home
- Data Model
- Architecture
- API Documentation
- Front End Documentation
- Testing
- Prototyping
- Other
- Contributing Guidelines and Etiquitte
- Labels
- License
- Admin