Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.01 KB

README.md

File metadata and controls

32 lines (24 loc) · 1.01 KB

API Documentation

This directory contains the API documentation for the OpenAPI specification.

Generating the API Documentation

The API documentation is automatically generated by swagger-jsdoc from the source code and served by swagger-ui-express in the /docs route.

Writing the documentation

The documentation is separated into modules, following the structure of the source code. Each module will contains the following files:

  • routes.yaml: contains the routes documentation for the module
  • schemas.yaml: contains the schemas used by the routes

So the folder structure will be:

docs
└── swagger
    ├── modules
    │   ├── common
    │   │   ├── routes.yaml
    │   │   └── schemas.yaml
    │   ├── users
    │   │   ├── routes.yaml
    │   │   └── schemas.yaml
    │   └── posts
    │       ├── routes.yaml
    │       └── schemas.yaml
    └─── index.yaml (global definitions)