3.1 Schema: Add media-range format for content objects
MODIFY
schemas/v3.1/schema.json
schemas/v3.1/schema.json
"$dynamicRef": "#meta"
},
"content": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/media-type"
- }
+ "$ref": "#/$defs/content"
}
},
"required": [
"type": "string"
},
"content": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/media-type"
- }
+ "$ref": "#/$defs/content"
},
"required": {
"default": false,
"$ref": "#/$defs/request-body"
}
},
+ "content": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/media-type"
+ },
+ "propertyNames": {
+ "format": "media-range"
+ }
+ },
"media-type": {
"type": "object",
"properties": {
"type": "object",
"properties": {
"contentType": {
- "type": "string"
+ "type": "string",
+ "format": "media-range"
},
"headers": {
"type": "object",
}
},
"content": {
- "type": "object",
- "addtionalProperties": {
- "$ref": "#/$defs/media-type"
- }
+ "$ref": "#/$defs/content"
},
"links": {
"type": "object",
"content": {
"properties": {
"content": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/$defs/media-type"
- }
+ "$ref": "#/$defs/content"
}
}
}

MODIFY
schemas/v3.1/schema.yaml
schemas/v3.1/schema.yaml
@@ -299,9 +299,7 @@ $defs:
schema:
$dynamicRef: '#meta'
content:
- type: object
- additionalProperties:
- $ref: '#/$defs/media-type'
+ $ref: '#/$defs/content'
required:
- in
oneOf:
@@ -427,9 +425,7 @@ $defs:
description:
type: string
content:
- type: object
- additionalProperties:
- $ref: '#/$defs/media-type'
+ $ref: '#/$defs/content'
required:
default: false
type: boolean
@@ -447,6 +443,13 @@ $defs:
else:
$ref: '#/$defs/request-body'
+ content:
+ type: object
+ additionalProperties:
+ $ref: '#/$defs/media-type'
+ propertyNames:
+ format: media-range
+
media-type:
type: object
properties:
@@ -466,6 +469,7 @@ $defs:
properties:
contentType:
type: string
+ format: media-range
headers:
type: object
additionalProperties:
@@ -525,9 +529,7 @@ $defs:
additionalProperties:
$ref: '#/$defs/header-or-reference'
content:
- type: object
- addtionalProperties:
- $ref: '#/$defs/media-type'
+ $ref: '#/$defs/content'
links:
type: object
additionalProperties:
@@ -646,9 +648,7 @@ $defs:
content:
properties:
content:
- type: object
- additionalProperties:
- $ref: '#/$defs/media-type'
+ $ref: '#/$defs/content'
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false

3.1 Schema: Add media-range format for content objects