@@ -221,51 +221,51 @@ A structural schema is an [OpenAPI v3.0 validation schema](#validation) which:
221221
222222Non-structural example 1:
223223
224- ``` none
224+ ``` yaml
225225allOf :
226226- properties :
227227 foo :
228- ...
228+ # ...
229229```
230230
231231conflicts with rule 2. The following would be correct:
232232
233- ``` none
233+ ``` yaml
234234properties :
235235 foo :
236- ...
236+ # ...
237237allOf :
238238- properties :
239239 foo :
240- ...
240+ # ...
241241```
242242
243243Non-structural example 2:
244244
245- ``` none
245+ ``` yaml
246246allOf :
247247- items :
248248 properties :
249249 foo :
250- ...
250+ # ...
251251```
252252conflicts with rule 2. The following would be correct:
253253
254- ``` none
254+ ``` yaml
255255items :
256256 properties :
257257 foo :
258- ...
258+ # ...
259259allOf :
260260- items :
261261 properties :
262262 foo :
263- ...
263+ # ...
264264```
265265
266266Non-structural example 3:
267267
268- ``` none
268+ ``` yaml
269269properties :
270270 foo :
271271 pattern : " abc"
@@ -479,7 +479,7 @@ properties:
479479Also those nodes are partially excluded from rule 3 in the sense that the following two patterns are allowed
480480(exactly those, without variations in order to additional fields) :
481481
482- ` ` ` none
482+ ` ` ` yaml
483483x-kubernetes-int-or-string: true
484484anyOf:
485485 - type: integer
@@ -489,13 +489,13 @@ anyOf:
489489
490490and
491491
492- ` ` ` none
492+ ` ` ` yaml
493493x-kubernetes-int-or-string: true
494494allOf:
495495 - anyOf:
496496 - type: integer
497497 - type: string
498- - ... # zero or more
498+ - # ... zero or more
499499...
500500` ` `
501501
@@ -522,12 +522,12 @@ properties:
522522
523523Here, the field `foo` holds a complete object, e.g. :
524524
525- ` ` ` none
525+ ` ` ` yaml
526526foo:
527527 apiVersion: v1
528528 kind: Pod
529529 spec:
530- ...
530+ # ...
531531` ` `
532532
533533Because `x-kubernetes-preserve-unknown-fields : true` is specified alongside, nothing is pruned.
@@ -796,8 +796,8 @@ rules are supported.
796796
797797For example :
798798
799- ` ` ` none
800- ...
799+ ` ` ` yaml
800+ # ...
801801 openAPIV3Schema:
802802 type: object
803803 properties:
@@ -809,7 +809,7 @@ For example:
809809 - rule: "self.replicas <= self.maxReplicas"
810810 message: "replicas should be smaller than or equal to maxReplicas."
811811 properties:
812- ...
812+ # ...
813813 minReplicas:
814814 type: integer
815815 replicas:
@@ -912,8 +912,8 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
912912 ` metadata.generateName` . This includes selection of fields in both the `spec` and `status` in the
913913 same expression :
914914
915- ` ` ` none
916- ...
915+ ` ` ` yaml
916+ # ...
917917 openAPIV3Schema:
918918 type: object
919919 x-kubernetes-validations:
@@ -924,7 +924,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
924924 properties:
925925 minReplicas:
926926 type: integer
927- ...
927+ # ...
928928 status:
929929 type: object
930930 properties:
@@ -936,8 +936,8 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
936936 via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as
937937 absent fields in CEL expressions.
938938
939- ` ` ` none
940- ...
939+ ` ` ` yaml
940+ # ...
941941 openAPIV3Schema:
942942 type: object
943943 properties:
@@ -946,7 +946,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
946946 x-kubernetes-validations:
947947 - rule: "has(self.foo)"
948948 properties:
949- ...
949+ # ...
950950 foo:
951951 type: integer
952952 ` ` `
@@ -955,8 +955,8 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
955955 are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all
956956 entries of the map are accessible via CEL macros and functions such as `self.all(...)`.
957957
958- ` ` ` none
959- ...
958+ ` ` ` yaml
959+ # ...
960960 openAPIV3Schema:
961961 type: object
962962 properties:
@@ -965,7 +965,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
965965 x-kubernetes-validations:
966966 - rule: "self['xyz'].foo > 0"
967967 additionalProperties:
968- ...
968+ # ...
969969 type: object
970970 properties:
971971 foo:
@@ -975,12 +975,12 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
975975- If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and
976976 also by macros and functions.
977977
978- ` ` ` none
979- ...
978+ ` ` ` yaml
979+ # ...
980980 openAPIV3Schema:
981981 type: object
982982 properties:
983- ...
983+ # ...
984984 foo:
985985 type: array
986986 x-kubernetes-validations:
@@ -991,15 +991,15 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6
991991
992992- If the Rule is scoped to a scalar, `self` is bound to the scalar value.
993993
994- ` ` ` none
995- ...
994+ ` ` ` yaml
995+ # ...
996996 openAPIV3Schema:
997997 type: object
998998 properties:
999999 spec:
10001000 type: object
10011001 properties:
1002- ...
1002+ # ...
10031003 foo:
10041004 type: integer
10051005 x-kubernetes-validations:
0 commit comments