Socket
Socket
Sign inDemoInstall

expresso-api

Package Overview
Dependencies
285
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    expresso-api

An Express.js tool to statically analyze the backend, generating the specification for its routes using the OpenAPI standard.


Version published
Weekly downloads
108
increased by163.41%
Maintainers
3
Install size
26.5 MB
Created
Weekly downloads
 

Readme

Source

ExpressO

An Express.js CLI tool to statically analyze the backend, generating the specification for its routes using the OpenAPI standard.

How to install

npm install -g expresso-api

This will allow you to use the expresso command from anywhere.

Requirements

The project for which you wish to generate the OpenAPI specification should:

  • be an Express.js project;
  • be able to complete the start-up without any errors;

Commands — How to use

Generate

This command is used to generate the OpenAPI3.0 specification relative to an Express.js project by statically analyzing it.

Usage: expresso generate [--root] [--start] [--output] [--ext]

Description:

CommandAliasDescriptionDefault
--rootSpecifies the root of the Express.js project to generate an OpenAPI specification for, defaults to current working directory.process.cwd()
--startThe command line that will be used to start the project.npm start
--output-OSpecifies a path of where to output the OpenAPI specification../expresso-openapi
--ext-ESpecifies which format to use for the output between json and yaml.json

Test

This command takes as input another specification and compares it to the one that the tool generates.

Usage: expresso test <OAPIspec> [--root] [--start] [--output] [--ext]

Arguments
ArgumentDescription
OAPIspecSpecifies the file path that points to the OpenAPI specification that the generated one will be tested against.
Options' descriptions
CommandAliasDescriptionDefault
--rootSpecifies the root of the Express.js project to generate an OpenAPI specification for, defaults to current working directory.process.cwd()
--startThe command line that will be used to start the project.npm start
--output-OSpecifies a path of where to output the OpenAPI specification../expresso-openapi
--ext-ESpecifies which format to use for the output between json and yaml.json

Compare

Usage: expresso compare <OAPIspecA> <OAPIspecB> [--json]

Arguments
ArgumentDescription
OAPIspecASpecifies the file path that points to an OpenAPI specification.
OAPIspecBSpecifies the file path that points to a second OpenAPI specification that will be compared to OAPIspecA
Options' descriptions
CommandAliasDescriptionDefault
--json-JSpecifies to produce a JSON instead of a human readable reportFalse

Known Issues

  • The response mining has issues with local identifiers. Global constants are self explanatory but local variables (e.g: status) does not say anything about the type of response.

FAQs

Last updated on 18 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc