Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mock-to-openapi

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-to-openapi

Cli tool (and library) for converting JSON mock objects to Open API schemas

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

JSON mock to OpenAPI converter

NPM Downloads NPM Version NPM License Last Commit GitHub Workflow Status

Cli tool (and library) for converting JSON mock objects to OpenAPI schemas.

Install

npm install --global mock-to-openapi 

Usage

Following command will convert all *.json files from directory ./examples to YAML OpenAPI schemas.

mock-to-openapi ./examples

Example

Let's have, for example, json object with:

{
	"title": "This is title",
	"author": "Roman Ožana",
	"content": "This is just an example",
	"date": "2020-05-12T23:50:21.817Z"
}

Tool mock-to-openapi converts JSON to the OpenAPI specification as follows:

type: object
properties:
  title:
    type: string
    example: This is title
  author:
    type: string
    example: Roman Ožana
  content:
    type: string
    example: This is just an example
  date:
    type: string
    format: date-time
    example: 2020-05-12T23:50:21.817Z

Keywords

FAQs

Package last updated on 09 Dec 2024

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc