Socket
Book a DemoInstallSign in
Socket

@useoptic/openapi-cli

Package Overview
Dependencies
Maintainers
4
Versions
285
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@useoptic/openapi-cli

latest
npmnpm
Version
0.42.2
Version published
Maintainers
4
Created
Source

Optic oas cli

Intall oas as part of installing optic:

npm install -g @useoptic/optic

Easily adopt OpenAPI

Create new and update existing OpenAPI specifications straight from your services' traffic. Optic makes it easy to adopt OpenAPI in a day, without changing how you work.

Tracking changes with Optic:

Show Optic real API traffic using the oas capture commands. Traffic can come from your development environment, tests, or the browser.

oas capture --proxy localhost:3000 traffic.har

Captured traffic is like working copy in Git. Use oas status to see the difference between how your OpenAPI specification says your API works, and how it actually works.

oas openapi.yaml status --har traffic.har

Run oas add and oas update to update the spec. Optic precision patches your OpenAPI file with the same additions, updates, and removals you would manually write. This is faster and much less error-prone than writing OpenAPI by hand.

oas openapi.yaml add --har traffic.har  GET /lists
oas openapi.yaml update --har traffic.har

A collaborator, not a generator

Using oas to update your spec is like working with a collaborator. It helps you write all the boilerplate OpenAPI and keep your spec in sync with the actual API's behavior.

Never overwrites changes developers make to the same OpenAPI file

Respects $refs across multiple files

Improves accuracy of your specification

Speeds up your team

Read Adopting OpenAPI documentation

FAQs

Package last updated on 04 Apr 2023

Did you know?

Socket

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