An Express.js tool to statically analyze the backend, generating the specification for its routes using the OpenAPI standard.
npm install -g expresso-apiThis will allow you to use the expresso command from anywhere.
Usage: expresso generate [--root] [--start] [--output] [--ext]
Description:
| Command | Alias | Description | Default |
|------------|-------|-------------------------------------------------------------------------------------------------------------------------------|----------------------|
| --root | | Specifies the root of the Express.js project to generate an OpenAPI specification for, defaults to current working directory. | process.cwd() |
| --start | | The command line that will be used to start the project. | npm start |
| --output | -O | Specifies a path of where to output the OpenAPI specification. | ./expresso-openapi |
| --ext | -E | Specifies which format to use for the output between json and yaml. | json |
[//]: # (### Monitor)
[//]: # (This command is similar to generate but will continue monitoring the backend and periodically update the OpenAPI3.0 specification with metrics about the data coming through the routes.)
[//]: # ()
[//]: # ( Not implemented yet.)
Usage: expresso test
#### Arguments
| Argument | Description |
|------------|-----------------------------------------------------------------------------------------------------------------|
| OAPIspec | Specifies the file path that points to the OpenAPI specification that the generated one will be tested against. |
#### Options' descriptions
| Command | Alias | Description | Default |
|------------|-------|-------------------------------------------------------------------------------------------------------------------------------|----------------------|
| --root | | Specifies the root of the Express.js project to generate an OpenAPI specification for, defaults to current working directory. | process.cwd() |
| --start | | The command line that will be used to start the project. | npm start |
| --output | -O | Specifies a path of where to output the OpenAPI specification. | ./expresso-openapi |
| --ext | -E | Specifies which format to use for the output between json and yaml. | json |
expresso compare [--json] #### Arguments
| Argument | Description |
|-------------|------------------------------------------------------------------------------------------------------------|
| OAPIspecA | Specifies the file path that points to an OpenAPI specification. |
| OAPIspecB | Specifies the file path that points to a second OpenAPI specification that will be compared to OAPIspecA |
#### Options' descriptions
| Command | Alias | Description | Default |
|----------|-------|----------------------------------------------------------------|---------|
| --json | -J | Specifies to produce a JSON instead of a human readable report | False |
[//]: # (## Limitations)
[//]: # (Currently, the tool only allows users to extract all the endpoints registered in the application and the corresponding response codes.)
[//]: # (This should suffice to generate the skeleton of a valid OpenAPI documentation.)
status) does not say anything about the type of response.