Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wmfs/json-schema-markdown-a-tron
Turn a JSON Schema object into markdown string
https://github.com/wmfs/json-schema-markdown-a-tron
package tymly
Last synced: 3 months ago
JSON representation
Turn a JSON Schema object into markdown string
- Host: GitHub
- URL: https://github.com/wmfs/json-schema-markdown-a-tron
- Owner: wmfs
- License: mit
- Created: 2019-01-13T10:34:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T16:41:08.000Z (3 months ago)
- Last Synced: 2024-10-24T23:37:13.919Z (3 months ago)
- Topics: package, tymly
- Language: JavaScript
- Homepage:
- Size: 172 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# json-schema-markdown-a-tron
[![CircleCI](https://circleci.com/gh/wmfs/json-schema-markdown-a-tron.svg?style=svg)](https://circleci.com/gh/wmfs/json-schema-markdown-a-tron)
> Turn a JSON-Schema object into markdown string# Installation
``` bash
npm install @wmfs/json-schema-markdown-a-tron --save
`````` javascript
const getMarkdown = require('@wmfs/json-schema-markdown-a-tron')
const output = getMarkdown(
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
}
}
}
)// Results
// output.markdown = Markdown string.
// output.title = Schema title, if there is one.
// output.description = Schema description, if there is one.
// output.example = Schema example, if there is one.```
## License
[MIT](https://github.com/wmfs/json-schema-markdown-a-tron/blob/master/LICENSE)