explain-json-schema

1.1.1 • Public • Published

Explain JSON schema

This project allows to convert a JSON schema to native english text.

Examples:

Supported JSON schema features

  • Basic attributes:
    • enum, const
    • deprecated
    • $ref locally
  • number, integer
    • minimum, maximum, exclusiveMinimum, exclusiveMaximum
    • multipleOf
  • string
    • minLength, maxLength
    • format
    • pattern
    • contentMediaType
    • contentEncoding
  • boolean
  • null
  • object
    • properties
    • additionalProperties (as boolean and as object)
    • patternProperties
    • required
    • minProperties, maxProperties
    • propertyNames.pattern
  • array
    • items (schema)
    • items (array of schemas)
    • minItems, maxItems
    • uniqueItems
    • contains
    • minContains, maxContains
  • allOf, oneOf, anyOf, not
  • if, then, else
  • multiple types (type: ["string", "null"])

Missing JSON schema features

  • object: dependencies (Properties and Schema)

Install & Usage

npm install explain-json-schema

Run:

npx explain-json-schema --schema schema.json >TEXT.md

Use as lib:

See cli.js

License

This software is released under the MIT license.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Readme

Keywords

none

Package Sidebar

Install

npm i explain-json-schema

Weekly Downloads

2,377

Version

1.1.1

License

MIT

Unpacked Size

32.9 kB

Total Files

34

Last publish

Collaborators

  • simonwalz