Skip to content

Commit a00eff1

Browse files
authored
Config file: update JSON schema (#9830)
* Config file: update JSON schema - Add build.commands - Mark deprecated attributes as such - Mention a little more about how the schema can be used :) Closes #9822
1 parent 7bf6ee7 commit a00eff1

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

docs/user/config-file/v2.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,9 @@ Schema
803803

804804
You can see the complete schema
805805
`here <https://github.com/readthedocs/readthedocs.org/blob/main/readthedocs/rtd_tests/fixtures/spec/v2/schema.json>`_.
806+
This schema is available at `Schema Store`_, use it with your favorite editor for validation and autocompletion.
806807

808+
.. _Schema Store: https://www.schemastore.org/
807809

808810
Legacy ``build`` specification
809811
------------------------------

readthedocs/rtd_tests/fixtures/spec/v2/schema.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$comment": "https://docs.readthedocs.io/en/stable/config-file/index.html",
44
"title": "Read the Docs",
55
"description": "Read the Docs configuration file.",
@@ -59,12 +59,13 @@
5959
"properties": {
6060
"image": {
6161
"title": "Image",
62-
"description": "The build docker image to be used.",
62+
"description": "DEPRECATED: use build.os instead.\n\nThe build docker image to be used.",
6363
"enum": [
6464
"stable",
6565
"latest"
6666
],
67-
"default": "latest"
67+
"default": "latest",
68+
"deprecated": true
6869
},
6970
"apt_packages": {
7071
"title": "APT Packages",
@@ -214,6 +215,15 @@
214215
"type": "string"
215216
},
216217
"default": []
218+
},
219+
"commands": {
220+
"title": "Build commands",
221+
"description": "Override the whole build process with custom commands. When using this option, none of the commands from build.jobs will be executed.",
222+
"type": "array",
223+
"items": {
224+
"title": "Custom commands",
225+
"type": "string"
226+
}
217227
}
218228
},
219229
"required": [
@@ -231,7 +241,7 @@
231241
"properties": {
232242
"version": {
233243
"title": "Version",
234-
"description": "The Python version (this depends on the build image).",
244+
"description": "DEPRECATED: use build.tools.python instead.\n\nThe Python version to activate for your build (availability of Python versions depend on the build image).",
235245
"type": "string",
236246
"enum": [
237247
"2",
@@ -245,7 +255,8 @@
245255
"3.7",
246256
"3.8"
247257
],
248-
"default": "3"
258+
"default": "3",
259+
"deprecated": true
249260
},
250261
"system_packages": {
251262
"title": "System Packages",

0 commit comments

Comments
 (0)