Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"input": [
{
"content": "valid item"
},
["this array is not a valid item"]
]
}
20 changes: 20 additions & 0 deletions test/inputs/schema/nested-intersection-union.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"input": [
{
"content": "hello",
"id": "item-1",
"output": "42",
"summary": "all fields present"
},
{
"content": "just a message"
},
{
"id": "item-2",
"output": "function result"
},
{
"summary": "just reasoning"
}
]
}
58 changes: 58 additions & 0 deletions test/inputs/schema/nested-intersection-union.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/definitions/Message" },
{ "$ref": "#/definitions/Item" }
]
}
}
},
"required": ["input"],
"definitions": {
"Message": {
"type": "object",
"properties": {
"content": { "type": "string" }
},
"required": ["content"]
},
"Item": {
"oneOf": [
{ "$ref": "#/definitions/FunctionOutput" },
{ "$ref": "#/definitions/ReasoningItem" }
]
},
"FunctionOutput": {
"allOf": [
{ "$ref": "#/definitions/BaseItem" },
{
"type": "object",
"properties": {
"output": { "type": "string" }
},
"required": ["output"]
}
]
},
"BaseItem": {
"type": "object",
"properties": {
"id": { "type": "string" }
},
"required": ["id"]
},
"ReasoningItem": {
"type": "object",
"properties": {
"summary": { "type": "string" }
},
"required": ["summary"]
}
}
}
67 changes: 0 additions & 67 deletions test/unit/nested-intersection-union.test.ts

This file was deleted.