1.1.2 • Published 2 days ago

mock-to-openapi v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

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
1.1.2

2 days ago

1.1.1

11 days ago

1.1.0

11 days ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago