I am looking for tool to create openapi specification from json file. For example, I want to convert this:
{
"checked": false,
"dimensions": {
"width": 5,
"height": 10
},
"id": 1,
"name": "A green door",
"price": 12.5,
}
to
type: object
title: The root schema
description: The root schema comprises the entire JSON document.
default: {}
example:
- checked: false
dimensions:
width: 5
height: 10
id: 1
name: A green door
price: 12.5
tags:
- home
- green
required:
- checked
- dimensions
- id
- name
- price
- tags
additionalProperties: true
properties:
checked:
type: boolean
title: The checked schema
description: An explanation about the purpose of this instance.
default: false
example:
- false
dimensions:
type: object
title: The dimensions schema
description: An explanation about the purpose of this instance.
default: {}
example:
- width: 5
height: 10
required:
- width
- height
additionalProperties: true
properties:
width:
type: integer
title: The width schema
description: An explanation about the purpose of this instance.
default: 0
example:
- 5
height:
type: integer
title: The height schema
description: An explanation about the purpose of this instance.
default: 0
example:
- 10
id:
type: integer
title: The id schema
description: An explanation about the purpose of this instance.
default: 0
example:
- 1
name:
type: string
title: The name schema
description: An explanation about the purpose of this instance.
default: ''
example:
- A green door
price:
type: number
title: The price schema
description: An explanation about the purpose of this instance.
default: 0
example:
- 12.5