The jsonschema.json Configuration File

June 10, 2026 ยท View on GitHub

Warning

This configuration file format is under active development and is considered experimental. The format may change in future releases. We appreciate your feedback to help us improve this feature.

The JSON Schema CLI supports a jsonschema.json configuration file to simplify working with JSON Schema projects. Similar to how NPM uses package.json to manage JavaScript projects, jsonschema.json provides a centralized way to configure schema resolution, default dialects, and project metadata for your JSON Schema workflows.

It is meant to be used not only by this CLI but by other JSON Schema tooling such as Sourcemeta One.

Example

The jsonschema.json file format looks like this:

{
  "title": "My JSON Schema Project",
  "description": "A collection of schemas for my application",
  "defaultDialect": "https://json-schema.org/draft/2020-12/schema",
  "resolve": {
    "https://example.com/schemas/user": "./schemas/user.json",
    "https://example.com/schemas/product": "./schemas/product.json"
  },
  "ignore": [
    "./drafts"
  ],
  "lint": {
    "rules": [
      "./rules/require_type.json"
    ]
  }
}

Reference

All properties in the jsonschema.json file are optional. The following table describes the available configuration options:

PropertyTypeDescriptionDefault
titleStringThe title or name of your JSON Schema project-
descriptionStringA brief description of your JSON Schema project-
emailStringContact email for the project maintainer-
githubStringGitHub owner and repository-
websiteStringProject website URL-
baseUriStringThe base URI for your schemas (not used in this CLI yet)-
pathStringRelative path to the directory containing your schemasDirectory containing jsonschema.json
defaultDialectStringThe default JSON Schema dialect to use when a schema doesn't specify $schema. May be an absolute URI or a relative path, which is resolved to a canonical file:// URI relative to the directory containing jsonschema.json (the path property does not shift this base). Relative resolution is always against the configuration file, never against a schema's own $id. The same resolution applies to the --default-dialect command-line flag, using the current working directory as the base-
extensionString / String[]The schema extension/s used by the project.json / .yaml / .yml
ignoreString[]Paths to ignore relative to jsonschema.json. Glob patterns are not currently supported[]
resolveObjectA mapping of URIs to local file paths or other URIs for schema resolution remapping. Lookups are non-transitive: the value of a matching entry is the final target and is not itself looked up in resolve again{}
dependenciesObjectA mapping of URIs to relative file paths for external schema dependencies to install (see jsonschema install){}
lintObjectLint configuration{}
lint.rulesString[]Paths to custom lint rule schemas relative to jsonschema.json (see lint)[]

Lookup Algorithm

The JSON Schema CLI automatically discovers jsonschema.json configuration files using an ancestor lookup algorithm, similar to how NPM locates package.json files. When processing a schema, the CLI first looks for a jsonschema.json file in the same directory as the schema. If not found, it searches the parent directory, then the parent's parent directory, and so on, until a configuration file is found or the filesystem root is reached.