Skip to content

Commit b5bf761

Browse files
committed
3.1 Schema: Add media-range format for content objects
1 parent 84ea4a0 commit b5bf761

File tree

2 files changed

+27
-29
lines changed

2 files changed

+27
-29
lines changed

schemas/v3.1/schema.json

+15-17
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,7 @@
429429
"$dynamicRef": "#meta"
430430
},
431431
"content": {
432-
"type": "object",
433-
"additionalProperties": {
434-
"$ref": "#/$defs/media-type"
435-
}
432+
"$ref": "#/$defs/content"
436433
}
437434
},
438435
"required": [
@@ -636,10 +633,7 @@
636633
"type": "string"
637634
},
638635
"content": {
639-
"type": "object",
640-
"additionalProperties": {
641-
"$ref": "#/$defs/media-type"
642-
}
636+
"$ref": "#/$defs/content"
643637
},
644638
"required": {
645639
"default": false,
@@ -665,6 +659,15 @@
665659
"$ref": "#/$defs/request-body"
666660
}
667661
},
662+
"content": {
663+
"type": "object",
664+
"additionalProperties": {
665+
"$ref": "#/$defs/media-type"
666+
},
667+
"propertyNames": {
668+
"format": "media-range"
669+
}
670+
},
668671
"media-type": {
669672
"type": "object",
670673
"properties": {
@@ -692,7 +695,8 @@
692695
"type": "object",
693696
"properties": {
694697
"contentType": {
695-
"type": "string"
698+
"type": "string",
699+
"format": "media-range"
696700
},
697701
"headers": {
698702
"type": "object",
@@ -783,10 +787,7 @@
783787
}
784788
},
785789
"content": {
786-
"type": "object",
787-
"addtionalProperties": {
788-
"$ref": "#/$defs/media-type"
789-
}
790+
"$ref": "#/$defs/content"
790791
},
791792
"links": {
792793
"type": "object",
@@ -955,10 +956,7 @@
955956
"content": {
956957
"properties": {
957958
"content": {
958-
"type": "object",
959-
"additionalProperties": {
960-
"$ref": "#/$defs/media-type"
961-
}
959+
"$ref": "#/$defs/content"
962960
}
963961
}
964962
}

schemas/v3.1/schema.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,7 @@ $defs:
299299
schema:
300300
$dynamicRef: '#meta'
301301
content:
302-
type: object
303-
additionalProperties:
304-
$ref: '#/$defs/media-type'
302+
$ref: '#/$defs/content'
305303
required:
306304
- in
307305
oneOf:
@@ -427,9 +425,7 @@ $defs:
427425
description:
428426
type: string
429427
content:
430-
type: object
431-
additionalProperties:
432-
$ref: '#/$defs/media-type'
428+
$ref: '#/$defs/content'
433429
required:
434430
default: false
435431
type: boolean
@@ -447,6 +443,13 @@ $defs:
447443
else:
448444
$ref: '#/$defs/request-body'
449445

446+
content:
447+
type: object
448+
additionalProperties:
449+
$ref: '#/$defs/media-type'
450+
propertyNames:
451+
format: media-range
452+
450453
media-type:
451454
type: object
452455
properties:
@@ -466,6 +469,7 @@ $defs:
466469
properties:
467470
contentType:
468471
type: string
472+
format: media-range
469473
headers:
470474
type: object
471475
additionalProperties:
@@ -525,9 +529,7 @@ $defs:
525529
additionalProperties:
526530
$ref: '#/$defs/header-or-reference'
527531
content:
528-
type: object
529-
addtionalProperties:
530-
$ref: '#/$defs/media-type'
532+
$ref: '#/$defs/content'
531533
links:
532534
type: object
533535
additionalProperties:
@@ -646,9 +648,7 @@ $defs:
646648
content:
647649
properties:
648650
content:
649-
type: object
650-
additionalProperties:
651-
$ref: '#/$defs/media-type'
651+
$ref: '#/$defs/content'
652652
$ref: '#/$defs/specification-extensions'
653653
unevaluatedProperties: false
654654

0 commit comments

Comments
 (0)