We are using swagger-jsdoc
and swagger-ui-express
packages, check .routes
files to see examples on how to document endpoints
Note
Api documentation is avaiable at api/v1/docs
route in devloper server (production url or local developer server)
- Summary and Description: Provide a brief summary and detailed description of what the endpoint does.
- Tags: Group related endpoints together using tags.
- Request Parameters: Document any path parameters, query parameters, headers, and cookies.
- Request Body: Describe the structure of the request body, including required fields and their types.
- Responses: Document the possible responses, including status codes and the structure of the response body.
- Security: Specify any security requirements, such as authentication tokens.