-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyaml-schema.yaml
More file actions
177 lines (177 loc) · 5.15 KB
/
yaml-schema.yaml
File metadata and controls
177 lines (177 loc) · 5.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
$schema: https://yaml-schema.net/yaml-schema.yaml
$id: https://yaml-schema.net/draft/2025-11/meta-schema
title: YAML Schema meta-schema
description: Meta-schema for YAML Schema, based on JSON Schema meta-schema
type: object
$defs:
valid_types:
description: A list of valid types
type: string
enum:
# Scalars
- boolean
- integer
- number
- string
- "null"
# Complex Types
- array
- enum
- object
schema_type:
description: >-
The type of the schema
oneOf:
- $ref: "#/$defs/valid_types"
- type: array
items:
$ref: "#/$defs/valid_types"
schema:
description: >-
A meta schema for a YAML object schema
type: object
properties:
type:
$ref: "#/$defs/schema_type"
properties:
description: The properties that are defined in the schema
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
$ref: "#/$defs/schema"
description:
type: string
enum:
description: An array of accepted values
type: array
const:
description: A scalar value that must match the value
type:
- string
- integer
- number
- boolean
if:
description: >-
Subschema used only to choose whether `then` or `else` is applied; its assertion
errors are not reported on the parent.
$ref: "#/$defs/schema"
then:
description: Applied when the instance validates against `if`.
$ref: "#/$defs/schema"
else:
description: Applied when the instance does not validate against `if`.
$ref: "#/$defs/schema"
dependentRequired:
description: >-
When a property named by a key is present, every string in the array must also
be a property of the instance.
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
type: array
items:
type: string
dependentSchemas:
description: >-
When a property named by a key is present, the entire object instance must
validate against the corresponding subschema.
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
$ref: "#/$defs/schema"
array_of_schemas:
description: >-
An array of schemas
type: array
items:
$ref: "#/$defs/schema"
properties:
$schema:
description: Specifies which draft of the JSON Schema standard the schema adheres to.
type: string
$id:
description: >-
Sets a URI for the schema. You can use this unique URI to refer to elements of the
schema from inside the same document or from external JSON documents.
type: string
$defs:
description: A container for reusable JSON Schema fragments.
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
$ref: "#/$defs/schema"
title:
description: >-
The title of the schema
type: string
description:
description: A description of the schema
type: string
type:
description: defines the first constraint on the JSON data.
$ref: "#/$defs/schema_type"
properties:
description: >-
The properties that are defined in the schema
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
$ref: "#/$defs/schema"
additionalProperties:
oneOf:
- type: boolean
- $ref: "#/$defs/array_of_schemas"
not:
$ref: "#/$defs/schema"
oneOf:
$ref: "#/$defs/array_of_schemas"
allOf:
$ref: "#/$defs/array_of_schemas"
anyOf:
$ref: "#/$defs/array_of_schemas"
if:
description: >-
Subschema used only to choose whether `then` or `else` is applied; its assertion
errors are not reported on the parent.
$ref: "#/$defs/schema"
then:
description: Applied when the instance validates against `if`.
$ref: "#/$defs/schema"
else:
description: Applied when the instance does not validate against `if`.
$ref: "#/$defs/schema"
dependentRequired:
description: >-
When a property named by a key is present, every string in the array must also be a
property of the instance.
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
type: array
items:
type: string
dependentSchemas:
description: >-
When a property named by a key is present, the entire object instance must validate
against the corresponding subschema.
type: object
patternProperties:
"^[a-zA-Z0-9_-]+$":
$ref: "#/$defs/schema"
unevaluatedProperties:
description: >-
JSON Schema 2020-12 unevaluated vocabulary. Applies to object properties not already
evaluated by properties, patternProperties, additionalProperties, or in-place applicators
(e.g. allOf).
oneOf:
- type: boolean
- $ref: "#/$defs/schema"
unevaluatedItems:
description: >-
JSON Schema 2020-12 unevaluated vocabulary. Applies to array elements not already
evaluated by prefixItems, items, contains, or in-place applicators.
oneOf:
- type: boolean
- $ref: "#/$defs/schema"
additionalProperties: false