Socket
Book a DemoInstallSign in
Socket

openapi-enricher

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-enricher

Enrich an OpenAPI spec with response examples

1.1.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

OpenAPI Enricher

Enrich an OpenAPI spec with response examples

Usage

  • Install openapi-enricher with npm install openapi-enricher
  • Write your response exemples in a JSON file, following the provided template (examples.json)
  • Run npx openapi-enricher openapi.json -e examples.json -o enriched.json

Examples

Given the petstore OpenAPI specification file petstore.json and a file containing handwritten response examples. By running npx openapi-enricher petstore.json -e petstore-examples.json -o enriched.json you can obtain the result exposed in the enriched.json file.

Basically, it will merge the responses entries of both files.

Limitations

  • It support only examples for response in paths, not for components
  • It support only 1 examples file at a time

Credits

License

OpenAPI Enricher is licensed under the MIT License - see the LICENSE file for details.

Keywords

openapi

FAQs

Package last updated on 20 Jan 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.