Skip to content

Commit bda4218

Browse files
committed
so many fixes
1 parent 45971df commit bda4218

File tree

1 file changed

+141
-41
lines changed

1 file changed

+141
-41
lines changed

schemas/v3.0/schema.yaml

Lines changed: 141 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ required:
66
properties:
77
openapi:
88
type: string
9-
enum:
10-
- 3.0.0
9+
pattern: ^3\.0\.\d(-.+)?$
1110
info:
1211
$ref: '#/definitions/Info'
1312
externalDocs:
@@ -34,10 +33,12 @@ additionalProperties: false
3433
definitions:
3534
Reference:
3635
type: object
36+
required:
37+
- $ref
3738
properties:
3839
$ref:
3940
type: string
40-
format: uri-ref
41+
format: uriref
4142
Info:
4243
type: object
4344
required:
@@ -50,7 +51,7 @@ definitions:
5051
type: string
5152
termsOfService:
5253
type: string
53-
format: uri-ref
54+
format: uriref
5455
contact:
5556
$ref: '#/definitions/Contact'
5657
license:
@@ -69,7 +70,7 @@ definitions:
6970
type: string
7071
url:
7172
type: string
72-
format: uri-ref
73+
format: uriref
7374
email:
7475
type: string
7576
format: email
@@ -86,7 +87,7 @@ definitions:
8687
type: string
8788
url:
8889
type: string
89-
format: uri-ref
90+
format: uriref
9091
patternProperties:
9192
'^x-': {}
9293
additionalProperties: false
@@ -98,7 +99,7 @@ definitions:
9899
properties:
99100
url:
100101
type: string
101-
format: uri-ref
102+
format: uriref
102103
description:
103104
type: string
104105
variables:
@@ -254,31 +255,57 @@ definitions:
254255
type:
255256
type: string
256257
enum:
257-
- array
258-
- boolean
259-
- integer
260-
- number
261-
- object
262-
- string
258+
- array
259+
- boolean
260+
- integer
261+
- number
262+
- object
263+
- string
263264
not:
264-
$ref: '#/definitions/Schema'
265+
oneOf:
266+
- $ref: '#/definitions/Schema'
267+
- $ref: '#/definitions/Reference'
268+
allOf:
269+
type: array
270+
items:
271+
oneOf:
272+
- $ref: '#/definitions/Schema'
273+
- $ref: '#/definitions/Reference'
274+
oneOf:
275+
type: array
276+
items:
277+
oneOf:
278+
- $ref: '#/definitions/Schema'
279+
- $ref: '#/definitions/Reference'
280+
anyOf:
281+
type: array
282+
items:
283+
oneOf:
284+
- $ref: '#/definitions/Schema'
285+
- $ref: '#/definitions/Reference'
286+
items:
287+
type: array
288+
items:
289+
oneOf:
290+
- $ref: '#/definitions/Schema'
291+
- $ref: '#/definitions/Reference'
265292
properties:
266293
type: object
267294
additionalProperties:
268-
$ref: '#/definitions/Schema'
295+
oneOf:
296+
- $ref: '#/definitions/Schema'
297+
- $ref: '#/definitions/Reference'
269298
additionalProperties:
270299
oneOf:
271300
- $ref: '#/definitions/Schema'
301+
- $ref: '#/definitions/Reference'
272302
- type: boolean
273303
default: true
274304
description:
275305
type: string
276306
format:
277307
type: string
278308
default: {}
279-
$ref:
280-
type: string
281-
format: uri-ref
282309
nullable:
283310
type: boolean
284311
default: false
@@ -327,7 +354,7 @@ definitions:
327354
attribute:
328355
type: boolean
329356
default: false
330-
wrapperd:
357+
wrapped:
331358
type: boolean
332359
default: false
333360
patternProperties:
@@ -383,6 +410,8 @@ definitions:
383410

384411
MediaTypeWithExamples:
385412
type: object
413+
required:
414+
- examples
386415
properties:
387416
schema:
388417
oneOf:
@@ -409,17 +438,28 @@ definitions:
409438
type: string
410439
description:
411440
type: string
412-
value:
413-
type: string
441+
value: {}
414442
externalValue:
415443
type: string
416-
format: uri-ref
444+
format: uriref
417445
patternProperties:
418446
'^x-': {}
419447
additionalProperties: false
420448

421449
Header:
450+
oneOf:
451+
- $ref: '#/definitions/HeaderWithSchema'
452+
- $ref: '#/definitions/HeaderWithContent'
453+
454+
HeaderWithSchema:
455+
oneOf:
456+
- $ref: '#/definitions/HeaderWithSchemaWithExample'
457+
- $ref: '#/definitions/HeaderWithSchemaWithExamples'
458+
459+
HeaderWithSchemaWithExample:
422460
type: object
461+
required:
462+
- schema
423463
properties:
424464
description:
425465
type: string
@@ -439,24 +479,81 @@ definitions:
439479
default: simple
440480
explode:
441481
type: boolean
482+
allowReserved:
483+
type: boolean
484+
default: false
485+
schema:
486+
oneOf:
487+
- $ref: '#/definitions/Schema'
488+
- $ref: '#/definitions/Reference'
489+
example: {}
490+
patternProperties:
491+
'^x-': {}
492+
additionalProperties: false
493+
494+
HeaderWithSchemaWithExamples:
495+
type: object
496+
required:
497+
- schema
498+
- examples
499+
properties:
500+
description:
501+
type: string
502+
required:
503+
type: boolean
504+
default: false
505+
deprecated:
506+
type: boolean
507+
default: false
508+
allowEmptyValue:
509+
type: boolean
510+
default: false
511+
style:
512+
type: string
442513
enum:
443-
- false
514+
- simple
515+
default: simple
516+
explode:
517+
type: boolean
518+
allowReserved:
519+
type: boolean
444520
default: false
445521
schema:
446522
oneOf:
447523
- $ref: '#/definitions/Schema'
448524
- $ref: '#/definitions/Reference'
449525
examples:
450-
type: array
451-
items:
526+
type: object
527+
additionalProperties:
452528
oneOf:
453529
- $ref: '#/definitions/Example'
454530
- $ref: '#/definitions/Reference'
455-
example: {}
531+
patternProperties:
532+
'^x-': {}
533+
additionalProperties: false
534+
535+
HeaderWithContent:
536+
type: object
537+
required:
538+
- content
539+
properties:
540+
description:
541+
type: string
542+
required:
543+
type: boolean
544+
default: false
545+
deprecated:
546+
type: boolean
547+
default: false
548+
allowEmptyValue:
549+
type: boolean
550+
default: false
456551
content:
457552
type: object
458553
additionalProperties:
459554
$ref: '#/definitions/MediaType'
555+
minProperties: 1
556+
maxProperties: 1
460557
patternProperties:
461558
'^x-': {}
462559
additionalProperties: false
@@ -557,8 +654,6 @@ definitions:
557654
additionalProperties: false
558655

559656
Responses:
560-
allOf:
561-
- $ref: '#/definitions/Extensions'
562657
type: object
563658
properties:
564659
default:
@@ -577,6 +672,7 @@ definitions:
577672
type: object
578673
patternProperties:
579674
'^x-': {}
675+
additionalProperties: false
580676

581677

582678
SecurityRequirement:
@@ -610,7 +706,7 @@ definitions:
610706
type: string
611707
url:
612708
type: string
613-
format: uri-ref
709+
format: uriref
614710
patternProperties:
615711
'^x-': {}
616712
additionalProperties: false
@@ -825,6 +921,7 @@ definitions:
825921
- in
826922
- schema
827923
- required
924+
- examples
828925
properties:
829926
name:
830927
type: string
@@ -876,6 +973,7 @@ definitions:
876973
- name
877974
- in
878975
- schema
976+
- examples
879977
properties:
880978
name:
881979
type: string
@@ -927,6 +1025,7 @@ definitions:
9271025
- name
9281026
- in
9291027
- schema
1028+
- examples
9301029
properties:
9311030
name:
9321031
type: string
@@ -975,6 +1074,7 @@ definitions:
9751074
- name
9761075
- in
9771076
- schema
1077+
- examples
9781078
properties:
9791079
name:
9801080
type: string
@@ -1187,8 +1287,8 @@ definitions:
11871287
type: string
11881288
type:
11891289
type: string
1190-
enum:
1191-
- http
1290+
enum:
1291+
- http
11921292
description:
11931293
type: string
11941294
patternProperties:
@@ -1255,10 +1355,10 @@ definitions:
12551355
properties:
12561356
authorizationUrl:
12571357
type: string
1258-
format: uri-ref
1358+
format: uriref
12591359
refreshUrl:
12601360
type: string
1261-
format: uri-ref
1361+
format: uriref
12621362
scopes:
12631363
type: object
12641364
additionalProperties:
@@ -1274,10 +1374,10 @@ definitions:
12741374
properties:
12751375
tokenUrl:
12761376
type: string
1277-
format: uri-ref
1377+
format: uriref
12781378
refreshUrl:
12791379
type: string
1280-
format: uri-ref
1380+
format: uriref
12811381
scopes:
12821382
type: object
12831383
additionalProperties:
@@ -1293,10 +1393,10 @@ definitions:
12931393
properties:
12941394
tokenUrl:
12951395
type: string
1296-
format: uri-ref
1396+
format: uriref
12971397
refreshUrl:
12981398
type: string
1299-
format: uri-ref
1399+
format: uriref
13001400
scopes:
13011401
type: object
13021402
additionalProperties:
@@ -1313,13 +1413,13 @@ definitions:
13131413
properties:
13141414
authorizationUrl:
13151415
type: string
1316-
format: uri-ref
1416+
format: uriref
13171417
tokenUrl:
13181418
type: string
1319-
format: uri-ref
1419+
format: uriref
13201420
refreshUrl:
13211421
type: string
1322-
format: uri-ref
1422+
format: uriref
13231423
scopes:
13241424
type: object
13251425
additionalProperties:
@@ -1338,7 +1438,7 @@ definitions:
13381438
properties:
13391439
operationRef:
13401440
type: string
1341-
format: uri-ref
1441+
format: uriref
13421442
parameters:
13431443
type: object
13441444
additionalProperties: {}

0 commit comments

Comments
 (0)