Demo of Tapir Library:
This is just an example how to use Tapir to define endpoints.
The service define some endpoints to handle contacts.
Each contact contain the following information:
- Full name
- Telephone
- Country of birth
POST /contacts: add a contactPUT /contacts: update a contactDELETE /contacts/{email}: delete a contactGET /contacts/{email}: get contact infoGET /contacts: get all contacts
Each contact is identified by its email.
The Swagger/OAS 3 documentation can be browsed at http://localhost:8080/docs.
The documentation is generated automatically by Tapir. The implementation of the endpoint in charge of retrieving this info is defined in openAPIDocRoute in class MainApi. All the work is done by Tapir.