1.10.0 • Published 11 months ago

@wmfs/json-schema-markdown-a-tron v1.10.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

json-schema-markdown-a-tron

CircleCI

Turn a JSON-Schema object into markdown string

Installation

npm install @wmfs/json-schema-markdown-a-tron --save

Usage

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

1.9.0

11 months ago

1.10.0

11 months ago

1.8.0

1 year ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago