Skip to content

Commit c92ba4b

Browse files
committed
Add titles in JSON schemas
This way, the description isn't rendered in the tables of contents, leading to no more formatting errors.
1 parent 01b001d commit c92ba4b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

doc/manual/source/protocols/json/schema/derivation-v3.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ required:
2626
properties:
2727
name:
2828
type: string
29+
title: Derivation name
2930
description: |
3031
The name of the derivation.
3132
Used when calculating store paths for the derivation’s outputs.
3233
3334
version:
3435
const: 3
36+
title: Format version (must be 3)
3537
description: |
3638
Must be `3`.
3739
This is a guard that allows us to continue evolving this format.
@@ -49,6 +51,7 @@ properties:
4951
5052
outputs:
5153
type: object
54+
title: Output specifications
5255
description: |
5356
Information about the output paths of the derivation.
5457
This is a JSON object with one member per output, where the key is the output name and the value is a JSON object as described.
@@ -69,6 +72,7 @@ properties:
6972

7073
inputSrcs:
7174
type: array
75+
title: Input source paths
7276
description: |
7377
List of store paths on which this derivation depends.
7478
@@ -85,6 +89,7 @@ properties:
8589

8690
inputDrvs:
8791
type: object
92+
title: Input derivations
8893
description: |
8994
Mapping of derivation paths to lists of output names they provide.
9095
@@ -101,32 +106,37 @@ properties:
101106
102107
system:
103108
type: string
109+
title: Build system type
104110
description: |
105111
The system type on which this derivation is to be built
106112
(e.g. `x86_64-linux`).
107113
108114
builder:
109115
type: string
116+
title: Build program path
110117
description: |
111118
Absolute path of the program used to perform the build.
112119
Typically this is the `bash` shell
113120
(e.g. `/nix/store/r3j288vpmczbl500w6zz89gyfa4nr0b1-bash-4.4-p23/bin/bash`).
114121
115122
args:
116123
type: array
124+
title: Builder arguments
117125
description: |
118126
Command-line arguments passed to the `builder`.
119127
items:
120128
type: string
121129

122130
env:
123131
type: object
132+
title: Environment variables
124133
description: |
125134
Environment variables passed to the `builder`.
126135
additionalProperties:
127136
type: string
128137

129138
structuredAttrs:
139+
title: Structured attributes
130140
description: |
131141
[Structured Attributes](@docroot@/store/derivation/index.md#structured-attrs), only defined if the derivation contains them.
132142
Structured attributes are JSON, and thus embedded as-is.
@@ -139,11 +149,13 @@ properties:
139149
properties:
140150
path:
141151
type: string
152+
title: Output path
142153
description: |
143154
The output path, if known in advance.
144155
145156
method:
146157
type: string
158+
title: Content addressing method
147159
enum: [flat, nar, text, git]
148160
description: |
149161
For an output which will be [content addressed](@docroot@/store/derivation/outputs/content-address.md), a string representing the [method](@docroot@/store/store-object/content-address.md) of content addressing that is chosen.
@@ -156,9 +168,11 @@ properties:
156168
- [`git`](@docroot@/store/store-object/content-address.md#method-git)
157169
158170
hashAlgo:
171+
title: Hash algorithm
159172
"$ref": "./hash-v1.yaml#/$defs/algorithm"
160173

161174
hash:
162175
type: string
176+
title: Expected hash value
163177
description: |
164178
For fixed-output derivations, the expected content hash in base-16.

doc/manual/source/protocols/json/schema/hash-v1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: |
1010
type: object
1111
properties:
1212
algorithm:
13+
title: Hash algorithm
1314
"$ref": "#/$defs/algorithm"
1415
required:
1516
- algorithm

0 commit comments

Comments
 (0)