mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-27 07:50:47 +00:00
9a27d7aa78
* ci: add local mkdocs-admonitions plugin for prettier to allow admonition preservation * docs: remove uses of `prettier-ignore` for admonitions * test: rather use await expect * chore: use named group exclusively
77 lines
4.0 KiB
Markdown
77 lines
4.0 KiB
Markdown
---
|
|
title: JSON Schema
|
|
description: Renovate's JSON Schemas to describe possible configuration.
|
|
---
|
|
|
|
Renovate provides [JSON Schemas](https://json-schema.org/) which can provide autocomplete, documentation and validation in your editor.
|
|
Consult your editor's documentation for how to configure this functionality.
|
|
|
|
When Renovate creates an onboarding PR, it will automagically add the JSON Schema definition, like so:
|
|
|
|
```jsonc
|
|
{
|
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
// ...
|
|
}
|
|
```
|
|
|
|
As well as the `renovate-schema.json`, which covers repository configuration, Renovate also provides configuration for other types of configuration.
|
|
|
|
The following JSON Schemas are available for use:
|
|
|
|
- [`docs.renovatebot.com/renovate-schema.json`](renovate-schema.json)
|
|
- [`docs.renovatebot.com/renovate-inherited-schema.json`](renovate-inherited-schema.json)
|
|
- [`docs.renovatebot.com/renovate-global-schema.json`](renovate-global-schema.json)
|
|
|
|
See below for more details on each of them.
|
|
|
|
## Repository configuration (`renovate-schema.json`)
|
|
|
|
[`docs.renovatebot.com/renovate-schema.json`](renovate-schema.json) covers any [repository configuration options](./configuration-options.md) and is likely to be used in:
|
|
|
|
- a repository onboarded to Renovate
|
|
- any shared configuration presets
|
|
- global self-hosted configuration (alongside configuration options only present in `renovate-global-schema.json`
|
|
|
|
## Repository + inherited configuration (`renovate-inherited-schema.json`)
|
|
|
|
[`docs.renovatebot.com/renovate-inherited-schema.json`](renovate-inherited-schema.json) covers any [repository configuration options](./configuration-options.md), and any [inherited config options](./config-overview.md#inherited-config).
|
|
|
|
It is only likely to be used if you create an `org-inherited-config.json` (or override the filename with [`inheritConfigFileName`](./self-hosted-configuration.md#inheritconfigfilename)) in your shared config repo.
|
|
|
|
## Global self-hosted configuration (`renovate-global-schema.json`)
|
|
|
|
[`docs.renovatebot.com/renovate-global-schema.json`](renovate-global-schema.json) covers any [global self-hosted configuration](./self-hosted-configuration.md), and is likely to be used in:
|
|
|
|
- a `config.js`
|
|
- command-line arguments
|
|
|
|
### Usage with `config.js`
|
|
|
|
Unfortunately - at time of writing - Language Server Protocol (LSP) servers do no yet provide a way to use a JSON Schema to provide type hints in a JavaScript file.
|
|
|
|
## Limitations
|
|
|
|
The JSON Schema is autogenerated from the configuration options that Renovate holds.
|
|
|
|
While we aim to provide relevant options, documentation and validation rules where possible, there may be times where there is a gap in the schema.
|
|
|
|
Additionally, some of Renovate's concepts _cannot_ be validated through JSON Schema, as they require more complex checks that only happen in Renovate's codebase.
|
|
|
|
Using the JSON Schema is recommended for early feedback (in your editor, or for your agent) but it is recommended to look at the [documentation around validating your config](./config-validation.md), for instance using `renovate-config-validator`, which will provide a more robust and accurate validation process.
|
|
|
|
## Previous majors
|
|
|
|
The Renovate documentation site tracks the current release version of Renovate.
|
|
|
|
If you are using the current major version of Renovate, but not the most up-to-date version of Renovate, you may find that the JSON Schema describes a configuration option you do not yet have access to.
|
|
|
|
If you're using a previous major version of Renovate, there will likely be many differences between what you have available in your version of Renovate.
|
|
|
|
With this in mind, when Renovate releases a major version, we store an archive of the JSON Schema for the previous major version [in Schema Store](https://www.schemastore.org/).
|
|
|
|
!!! note
|
|
Previous major versions are only available since Renovate 39 (2025-04-29).
|
|
|
|
For instance, if you are running Renovate 41, you will be able to use i.e. [`www.schemastore.org/renovate-41.json`](https://www.schemastore.org/renovate-41.json) for your JSON Schema.
|