@@ -32,14 +32,18 @@ patternProperties:
3232 ' ^x- ' : {}
3333additionalProperties : false
3434definitions :
35+ RefProperty :
36+ type : string
37+ format : uri-reference
38+
3539 Reference :
3640 type : object
3741 required :
3842 - $ref
3943 patternProperties :
4044 ' ^\$ref$ ' :
41- type : string
42- format : uri-reference
45+ $ref : ' #/definitions/RefProperty '
46+
4347 Info :
4448 type : object
4549 required :
@@ -139,37 +143,27 @@ definitions:
139143 type : object
140144 patternProperties :
141145 ' ^[a-zA-Z0-9\.\-_]+$ ' :
142- oneOf :
143- - $ref : ' #/definitions/Reference'
144- - $ref : ' #/definitions/Response'
146+ $ref : ' #/definitions/Response'
145147 parameters :
146148 type : object
147149 patternProperties :
148150 ' ^[a-zA-Z0-9\.\-_]+$ ' :
149- oneOf :
150- - $ref : ' #/definitions/Reference'
151- - $ref : ' #/definitions/Parameter'
151+ $ref : ' #/definitions/Parameter'
152152 examples :
153153 type : object
154154 patternProperties :
155155 ' ^[a-zA-Z0-9\.\-_]+$ ' :
156- oneOf :
157- - $ref : ' #/definitions/Reference'
158- - $ref : ' #/definitions/Example'
156+ $ref : ' #/definitions/Example'
159157 requestBodies :
160158 type : object
161159 patternProperties :
162160 ' ^[a-zA-Z0-9\.\-_]+$ ' :
163- oneOf :
164- - $ref : ' #/definitions/Reference'
165- - $ref : ' #/definitions/RequestBody'
161+ $ref : ' #/definitions/RequestBody'
166162 headers :
167163 type : object
168164 patternProperties :
169165 ' ^[a-zA-Z0-9\.\-_]+$ ' :
170- oneOf :
171- - $ref : ' #/definitions/Reference'
172- - $ref : ' #/definitions/Header'
166+ $ref : ' #/definitions/Header'
173167 securitySchemes :
174168 type : object
175169 patternProperties :
@@ -181,16 +175,12 @@ definitions:
181175 type : object
182176 patternProperties :
183177 ' ^[a-zA-Z0-9\.\-_]+$ ' :
184- oneOf :
185- - $ref : ' #/definitions/Reference'
186- - $ref : ' #/definitions/Link'
178+ $ref : ' #/definitions/Link'
187179 callbacks :
188180 type : object
189181 patternProperties :
190182 ' ^[a-zA-Z0-9\.\-_]+$ ' :
191- oneOf :
192- - $ref : ' #/definitions/Reference'
193- - $ref : ' #/definitions/Callback'
183+ $ref : ' #/definitions/Callback'
194184 patternProperties :
195185 ' ^x- ' : {}
196186 additionalProperties : false
@@ -359,20 +349,18 @@ definitions:
359349 headers :
360350 type : object
361351 additionalProperties :
362- oneOf :
363- - $ref : ' #/definitions/Header'
364- - $ref : ' #/definitions/Reference'
352+ $ref : ' #/definitions/Header'
365353 content :
366354 type : object
367355 additionalProperties :
368356 $ref : ' #/definitions/MediaType'
369357 links :
370358 type : object
371359 additionalProperties :
372- oneOf :
373- - $ref : ' #/definitions/Link'
374- - $ref : ' #/definitions/Reference'
360+ $ref : ' #/definitions/Link'
375361 patternProperties :
362+ ' ^\$ref$ ' :
363+ $ref : ' #/definitions/RefProperty'
376364 ' ^x- ' : {}
377365 additionalProperties : false
378366
@@ -385,9 +373,7 @@ definitions:
385373 examples :
386374 type : object
387375 additionalProperties :
388- oneOf :
389- - $ref : ' #/definitions/Example'
390- - $ref : ' #/definitions/Reference'
376+ $ref : ' #/definitions/Example'
391377 encoding :
392378 type : object
393379 additionalProperties :
@@ -410,6 +396,8 @@ definitions:
410396 type : string
411397 format : uri-reference
412398 patternProperties :
399+ ' ^\$ref$ ' :
400+ $ref : ' #/definitions/RefProperty'
413401 ' ^x- ' : {}
414402 additionalProperties : false
415403
@@ -449,10 +437,10 @@ definitions:
449437 examples :
450438 type : object
451439 additionalProperties :
452- oneOf :
453- - $ref : ' #/definitions/Example'
454- - $ref : ' #/definitions/Reference'
440+ $ref : ' #/definitions/Example'
455441 patternProperties :
442+ ' ^\$ref$ ' :
443+ $ref : ' #/definitions/RefProperty'
456444 ' ^x- ' : {}
457445 additionalProperties : false
458446 allOf :
@@ -483,9 +471,7 @@ definitions:
483471 parameters :
484472 type : array
485473 items :
486- oneOf :
487- - $ref : ' #/definitions/Parameter'
488- - $ref : ' #/definitions/Reference'
474+ $ref : ' #/definitions/Parameter'
489475 uniqueItems : true
490476 patternProperties :
491477 ' ^(get|put|post|delete|options|head|patch|trace)$ ' :
@@ -513,22 +499,16 @@ definitions:
513499 parameters :
514500 type : array
515501 items :
516- oneOf :
517- - $ref : ' #/definitions/Parameter'
518- - $ref : ' #/definitions/Reference'
502+ $ref : ' #/definitions/Parameter'
519503 uniqueItems : true
520504 requestBody :
521- oneOf :
522- - $ref : ' #/definitions/RequestBody'
523- - $ref : ' #/definitions/Reference'
505+ $ref : ' #/definitions/RequestBody'
524506 responses :
525507 $ref : ' #/definitions/Responses'
526508 callbacks :
527509 type : object
528510 additionalProperties :
529- oneOf :
530- - $ref : ' #/definitions/Callback'
531- - $ref : ' #/definitions/Reference'
511+ $ref : ' #/definitions/Callback'
532512 deprecated :
533513 type : boolean
534514 default : false
@@ -548,14 +528,10 @@ definitions:
548528 type : object
549529 properties :
550530 default :
551- oneOf :
552- - $ref : ' #/definitions/Response'
553- - $ref : ' #/definitions/Reference'
531+ $ref : ' #/definitions/Response'
554532 patternProperties :
555533 ' ^[1-5](?:\d{2}|XX)$ ' :
556- oneOf :
557- - $ref : ' #/definitions/Response'
558- - $ref : ' #/definitions/Reference'
534+ $ref : ' #/definitions/Response'
559535 ' ^x- ' : {}
560536 minProperties : 1
561537 additionalProperties : false
@@ -659,15 +635,15 @@ definitions:
659635 examples :
660636 type : object
661637 additionalProperties :
662- oneOf :
663- - $ref : ' #/definitions/Example'
664- - $ref : ' #/definitions/Reference'
638+ $ref : ' #/definitions/Example'
665639 patternProperties :
640+ ' ^\$ref$ ' :
641+ $ref : ' #/definitions/RefProperty'
666642 ' ^x- ' : {}
667643 additionalProperties : false
668- required :
669- - name
670- - in
644+ oneOf :
645+ - required : [$ref]
646+ - required : [name, in]
671647 allOf :
672648 - $ref : ' #/definitions/ExampleXORExamples'
673649 - $ref : ' #/definitions/SchemaXORContent'
@@ -714,8 +690,6 @@ definitions:
714690
715691 RequestBody :
716692 type : object
717- required :
718- - content
719693 properties :
720694 description :
721695 type : string
@@ -727,8 +701,13 @@ definitions:
727701 type : boolean
728702 default : false
729703 patternProperties :
704+ ' ^\$ref$ ' :
705+ $ref : ' #/definitions/RefProperty'
730706 ' ^x- ' : {}
731707 additionalProperties : false
708+ oneOf :
709+ - required : ["content"]
710+ - required : ["$ref"]
732711
733712 SecurityScheme :
734713 oneOf :
@@ -945,6 +924,8 @@ definitions:
945924 server :
946925 $ref : ' #/definitions/Server'
947926 patternProperties :
927+ ' ^\$ref$ ' :
928+ $ref : ' #/definitions/RefProperty'
948929 ' ^x- ' : {}
949930 additionalProperties : false
950931 not :
@@ -956,6 +937,8 @@ definitions:
956937 additionalProperties :
957938 $ref : ' #/definitions/PathItem'
958939 patternProperties :
940+ ' ^\$ref$ ' :
941+ $ref : ' #/definitions/RefProperty'
959942 ' ^x- ' : {}
960943
961944 Encoding :
0 commit comments