{"id":47521,"library":"explain-json-schema","title":"explain-json-schema","description":"Explains JSON Schema in plain English text. Version 1.1.1 is current. Supports most JSON Schema features including allOf, oneOf, anyOf, if/then/else, and nested references. Use case: generating human-readable documentation or diffs for configurations defined by JSON Schema. Differentiator: produces natural language output rather than YAML/JSON.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install explain-json-schema","lang":"bash","label":"npm"},{"cmd":"yarn add explain-json-schema","lang":"bash","label":"yarn"},{"cmd":"pnpm add explain-json-schema","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only, so require is not supported.","wrong":"const { explainSchema } = require('explain-json-schema')","symbol":"explainSchema","correct":"import { explainSchema } from 'explain-json-schema'"},{"note":"export is named, not default.","wrong":"import explainSchema from 'explain-json-schema'","symbol":"explainSchema","correct":"import { explainSchema } from 'explain-json-schema'"},{"note":"No default export exists.","wrong":"import explain from 'explain-json-schema'","symbol":"default","correct":"import { explainSchema } from 'explain-json-schema'"}],"quickstart":{"code":"import { explainSchema } from 'explain-json-schema';\nimport { readFileSync } from 'fs';\n\nconst schema = JSON.parse(readFileSync('schema.json', 'utf8'));\nconst explanation = explainSchema(schema);\nconsole.log(explanation);","lang":"typescript","description":"Reads a JSON Schema file and outputs a natural language description of its constraints."},"warnings":[{"fix":"Pre-process schemas to handle dependencies manually or use a different library.","message":"The library does not support the 'dependencies' keyword for schemas (object property dependencies).","severity":"gotcha","affected_versions":"<=1.1.1"},{"fix":"Strip Markdown if needed.","message":"Output is Markdown-formatted text; not plain English only.","severity":"gotcha","affected_versions":"<=1.1.1"},{"fix":"Use `node node_modules/.bin/explain-json-schema` if npx fails.","message":"The CLI usage via npx may require a global install in some environments.","severity":"deprecated","affected_versions":"<=1.1.1"}],"env_vars":null,"search_vec":"'1.1.1':13 'allof':22 'anyof':24 'case':30 'configur':39 'current':15 'defin':40 'diff':37 'differenti':44 'document':35 'english':10 'explain':2,5 'explain-json-schema':1 'featur':20 'generat':31 'human':33 'human-read':32 'if/then/else':25 'includ':21 'javascript':52 'json':3,6,18,42 'languag':47 'natur':46 'nest':27 'oneof':23 'output':48 'plain':9 'produc':45 'rather':49 'readabl':34 'refer':28 'schema':4,7,19,43 'support':16 'text':11 'use':29 'version':12 'yaml/json':51","created_at":"2026-06-07T16:51:56.631599+00:00","updated_at":"2026-06-07T16:51:56.631599+00:00","problems":[{"fix":"Add `\"type\": \"module\"` to package.json or use dynamic import.","cause":"The project is ESM-only, but CommonJS is expected.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Use `import { explainSchema } from 'explain-json-schema'`.","cause":"Default import attempted instead of named import.","error":"TypeError: explainSchema is not a function"},{"fix":"Run `npm install explain-json-schema` and ensure import path is correct.","cause":"Module not installed or wrong import path.","error":"Error: Cannot find module 'explain-json-schema'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"explain-json-schema","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}