Update to the ImageContentItem datatype so url + data is not in a confusing union

This commit is contained in:
Ashwin Bharambe 2024-12-17 10:49:47 -08:00
parent 4936794de1
commit cf9fce6b6e
6 changed files with 36 additions and 29 deletions

View file

@ -2554,27 +2554,22 @@
"ImageContentItem": {
"type": "object",
"properties": {
"url": {
"$ref": "#/components/schemas/URL"
},
"data": {
"type": "string",
"contentEncoding": "base64"
},
"type": {
"type": "string",
"const": "image",
"default": "image"
},
"data": {
"oneOf": [
{
"type": "string",
"contentEncoding": "base64"
},
{
"$ref": "#/components/schemas/URL"
}
]
}
},
"additionalProperties": false,
"required": [
"type",
"data"
"type"
]
},
"InterleavedContent": {

View file

@ -1043,17 +1043,16 @@ components:
additionalProperties: false
properties:
data:
oneOf:
- contentEncoding: base64
type: string
- $ref: '#/components/schemas/URL'
contentEncoding: base64
type: string
type:
const: image
default: image
type: string
url:
$ref: '#/components/schemas/URL'
required:
- type
- data
type: object
InferenceStep:
additionalProperties: false