https://github.com/themcaffee/json-to-yaml-schema
Convert JSON responses into YAML OpenAPI Schemas
https://github.com/themcaffee/json-to-yaml-schema
Last synced: 3 months ago
JSON representation
Convert JSON responses into YAML OpenAPI Schemas
- Host: GitHub
- URL: https://github.com/themcaffee/json-to-yaml-schema
- Owner: themcaffee
- Created: 2017-11-06T23:00:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-06T23:01:02.000Z (over 8 years ago)
- Last Synced: 2025-09-10T20:56:50.704Z (10 months ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JSON to YAML OpenAPI Schema
Converts response JSON into an appropriate OpenAPI Schema in the YAML format.
## Examples
#### Object
```
python main.py '{"fname": "bobby", "lname": "tables"}'
```
Output:
```
type: object
properties:
fname:
type: string
lname:
type: string
```
#### List
```
python main.py '[{"fname": "bobby", "lname": "tables"}]'
```
Output:
```
type: array
items:
type: object
properties:
fname:
type: string
lname:
type: string
```