diff --git a/benchmark/package.json b/benchmark/package.json index 82918ab109..a0f4c17746 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -72,6 +72,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.11.4.tgz" + "typia": "../typia-6.12.0.tgz" } } \ No newline at end of file diff --git a/errors/package.json b/errors/package.json index 83ad0d188b..7d77e43b26 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-6.11.4.tgz" + "typia": "../typia-6.12.0.tgz" } } \ No newline at end of file diff --git a/package.json b/package.json index ef1b8297cc..9a8ab8bd33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.11.4", + "version": "6.12.0", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -67,7 +67,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "@samchon/openapi": "^1.1.2", + "@samchon/openapi": "^1.2.2", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", diff --git a/src/functional/Namespace/llm.ts b/src/functional/Namespace/llm.ts index f13dab39fd..657d257228 100644 --- a/src/functional/Namespace/llm.ts +++ b/src/functional/Namespace/llm.ts @@ -5,10 +5,11 @@ import { LlmSchemaSeparator } from "@samchon/openapi/lib/utils/LlmSchemaSeparato export const application = () => ({ finalize: ( app: ILlmApplication, - options?: ILlmApplication.IOptions, + options?: Omit, ): void => { app.options = { separate: options?.separate ?? null, + recursive: 3, }; if (app.options.separate === null) return; for (const func of app.functions) diff --git a/src/llm.ts b/src/llm.ts index 29092b7703..989ceb2531 100644 --- a/src/llm.ts +++ b/src/llm.ts @@ -40,7 +40,9 @@ import * as Namespace from "./functional/Namespace"; * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -function application(options?: ILlmApplication.IOptions): never; +function application( + options?: Omit, +): never; /** * TypeScript functions to LLM function calling application. @@ -79,7 +81,7 @@ function application(options?: ILlmApplication.IOptions): never; * @author Jeongho Nam - https://github.com/samchon */ function application( - options?: ILlmApplication.IOptions, + options?: Omit, ): ILlmApplication; /** diff --git a/src/programmers/internal/llm_schema_array.ts b/src/programmers/internal/llm_schema_array.ts deleted file mode 100644 index 3aaa571fad..0000000000 --- a/src/programmers/internal/llm_schema_array.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -import { MetadataArray } from "../../schemas/metadata/MetadataArray"; - -import { application_plugin } from "./application_plugin"; -import { llm_schema_station } from "./llm_schema_station"; - -/** - * @internal - */ -export const llm_schema_array = (array: MetadataArray): ILlmSchema.IArray[] => - application_plugin( - { - type: "array", - items: llm_schema_station({ - metadata: array.type.value, - blockNever: false, - attribute: {}, - }), - }, - array.tags, - ); diff --git a/src/programmers/internal/llm_schema_escaped.ts b/src/programmers/internal/llm_schema_escaped.ts deleted file mode 100644 index 3869471291..0000000000 --- a/src/programmers/internal/llm_schema_escaped.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataEscaped } from "../../schemas/metadata/MetadataEscaped"; - -import { llm_schema_station } from "./llm_schema_station"; - -/** - * @internal - */ -export const llm_schema_escaped = (escaped: MetadataEscaped): ILlmSchema[] => { - const output: ILlmSchema | null = llm_schema_station({ - metadata: escaped.returns, - blockNever: false, - attribute: {}, - }); - if (output === null) return []; - else if (is_date(new Set())(escaped.original)) { - const string: ILlmSchema.IString | undefined = is_string(output) - ? output - : is_one_of(output) - ? (output.oneOf.find(is_string) as ILlmSchema.IString) - : undefined; - if ( - string !== undefined && - string.format !== "date" && - string.format !== "date-time" - ) - string.format = "date-time"; - } - return is_one_of(output) ? (output.oneOf as ILlmSchema[]) : [output]; -}; - -/** - * @internal - */ -const is_string = (elem: ILlmSchema): elem is ILlmSchema.IString => - (elem as ILlmSchema.IString).type === "string"; - -/** - * @internal - */ -const is_one_of = (elem: ILlmSchema): elem is ILlmSchema.IOneOf => - Array.isArray((elem as ILlmSchema.IOneOf).oneOf); - -/** - * @internal - */ -const is_date = - (visited: Set) => - (meta: Metadata): boolean => { - if (visited.has(meta)) return false; - visited.add(meta); - - return ( - meta.natives.some((name) => name === "Date") || - meta.arrays.some((array) => is_date(visited)(array.type.value)) || - meta.tuples.some((tuple) => tuple.type.elements.some(is_date(visited))) || - meta.aliases.some((alias) => is_date(visited)(alias.value)) - ); - }; diff --git a/src/programmers/internal/llm_schema_native.ts b/src/programmers/internal/llm_schema_native.ts deleted file mode 100644 index 0278602681..0000000000 --- a/src/programmers/internal/llm_schema_native.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -/** - * @internal - */ -export const llm_schema_native = ( - name: string, -): ILlmSchema.IString | ILlmSchema.IObject => - name === "Blob" || name === "File" - ? { - type: "string", - format: "binary", - } - : { - type: "object", - properties: {}, - }; diff --git a/src/programmers/internal/llm_schema_object.ts b/src/programmers/internal/llm_schema_object.ts deleted file mode 100644 index c41c510bd6..0000000000 --- a/src/programmers/internal/llm_schema_object.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -import { CommentFactory } from "../../factories/CommentFactory"; - -import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; - -import { PatternUtil } from "../../utils/PatternUtil"; - -import { application_description } from "./application_description"; -import { llm_schema_station } from "./llm_schema_station"; -import { metadata_to_pattern } from "./metadata_to_pattern"; - -/** - * @internal - */ -export const llm_schema_object = (props: { - object: MetadataObject; - nullable: boolean; -}): ILlmSchema.IObject => { - // ITERATE PROPERTIES - const properties: Record = {}; - const extraMeta: ISuperfluous = { - patternProperties: {}, - additionalProperties: undefined, - }; - const required: string[] = []; - - for (const property of props.object.properties) { - if ( - // FUNCTIONAL TYPE - property.value.functions.length && - property.value.nullable === false && - property.value.isRequired() === true && - property.value.size() === 0 - ) - continue; - else if (property.jsDocTags.find((tag) => tag.name === "hidden")) continue; // THE HIDDEN TAG - - const key: string | null = property.key.getSoleLiteral(); - const schema: ILlmSchema | null = llm_schema_station({ - blockNever: true, - attribute: { - deprecated: - property.jsDocTags.some((tag) => tag.name === "deprecated") || - undefined, - title: (() => { - const info: IJsDocTagInfo | undefined = property.jsDocTags.find( - (tag) => tag.name === "title", - ); - if (info?.text?.length) return CommentFactory.merge(info.text); - else if (!property.description?.length) return undefined; - - const index: number = property.description.indexOf("\n"); - const top: string = ( - index === -1 - ? property.description - : property.description.substring(0, index) - ).trim(); - return top.endsWith(".") - ? top.substring(0, top.length - 1) - : undefined; - })(), - description: application_description(property), - }, - metadata: property.value, - }); - - if (schema === null) continue; - if (key !== null) { - properties[key] = schema; - if (property.value.isRequired() === true) required.push(key); - } else { - const pattern: string = metadata_to_pattern(true)(property.key); - if (pattern === PatternUtil.STRING) - extraMeta.additionalProperties = [property.value, schema]; - else extraMeta.patternProperties[pattern] = [property.value, schema]; - } - } - - return { - type: "object", - properties, - nullable: props.nullable, - required: required.length ? required : undefined, - title: (() => { - const info: IJsDocTagInfo | undefined = props.object.jsDocTags.find( - (tag) => tag.name === "title", - ); - return info?.text?.length ? CommentFactory.merge(info.text) : undefined; - })(), - description: application_description(props.object), - additionalProperties: join(extraMeta), - }; -}; - -/** - * @internal - */ -const join = (extra: ISuperfluous): ILlmSchema | false => { - // LIST UP METADATA - const elements: [Metadata, ILlmSchema][] = Object.values( - extra.patternProperties || {}, - ); - if (extra.additionalProperties) elements.push(extra.additionalProperties); - - // SHORT RETURN - if (elements.length === 0) return false; - else if (elements.length === 1) return elements[0]![1]!; - - // MERGE METADATA AND GENERATE VULNERABLE SCHEMA - const meta: Metadata = elements - .map((tuple) => tuple[0]) - .reduce((x, y) => Metadata.merge(x, y)); - return llm_schema_station({ - blockNever: true, - attribute: {}, - metadata: meta, - }); -}; - -/** - * @internal - */ -interface ISuperfluous { - additionalProperties?: undefined | [Metadata, ILlmSchema]; - patternProperties: Record; -} diff --git a/src/programmers/internal/llm_schema_station.ts b/src/programmers/internal/llm_schema_station.ts deleted file mode 100644 index 984d5d286f..0000000000 --- a/src/programmers/internal/llm_schema_station.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { application_bigint } from "./application_bigint"; -import { application_boolean } from "./application_boolean"; -import { application_number } from "./application_number"; -import { application_string } from "./application_string"; -import { application_templates } from "./application_templates"; -import { application_v30_constant } from "./application_v30_constant"; -import { llm_schema_array } from "./llm_schema_array"; -import { llm_schema_escaped } from "./llm_schema_escaped"; -import { llm_schema_native } from "./llm_schema_native"; -import { llm_schema_object } from "./llm_schema_object"; -import { llm_schema_tuple } from "./llm_schema_tuple"; - -/** - * @internal - */ -export const llm_schema_station = (props: { - metadata: Metadata; - blockNever: boolean; - attribute: ILlmSchema.__IAttribute; -}): ILlmSchema => { - // VULNERABLE CASE - if (props.metadata.any === true) - return { - ...props.attribute, - type: undefined, - }; - else if (props.metadata.nullable === true && props.metadata.empty() === true) - return { - ...props.attribute, - type: "null", - }; - - //---- - // GATHER UNION SCHEMAS - //---- - const union: ILlmSchema[] = []; - const insert = props.metadata.nullable - ? (schema: ILlmSchema) => - union.push({ - ...schema, - nullable: (schema as ILlmSchema.__ISignificant).type - ? true - : undefined, - } as ILlmSchema) - : (schema: ILlmSchema) => union.push(schema); - - // toJSON() METHOD - if (props.metadata.escaped !== null) - llm_schema_escaped(props.metadata.escaped).forEach(insert); - - // ATOMIC TYPES - if ( - props.metadata.templates.length && - AtomicPredicator.template(props.metadata) - ) - application_templates<"3.0">(props.metadata).forEach(insert); - for (const constant of props.metadata.constants) - if (AtomicPredicator.constant(props.metadata)(constant.type) === false) - continue; - else insert(application_v30_constant(constant)); - for (const a of props.metadata.atomics) - if (a.type === "boolean") application_boolean<"3.0">(a).forEach(insert); - else if (a.type === "bigint") application_bigint<"3.0">(a).forEach(insert); - else if (a.type === "number") application_number<"3.0">(a).forEach(insert); - else if (a.type === "string") application_string<"3.0">(a).forEach(insert); - - // ARRAY - for (const array of props.metadata.arrays) - if (array.type.recursive) - throw new Error( - "Error on LlmSchemaProgrammer.write(): LLM schema does not allow recursive array type.", - ); - else llm_schema_array(array).forEach(insert); - - // TUPLE - for (const tuple of props.metadata.tuples) - if (tuple.type.recursive) - throw new Error( - "Error on LlmSchemaProgrammer.write(): LLM schema does not allow recursive tuple type.", - ); - else - insert( - llm_schema_tuple({ - tuple, - attribute: props.attribute, - }), - ); - - // NATIVES - for (const native of props.metadata.natives) - if (AtomicPredicator.native(native)) { - const type: string = native.toLowerCase(); - if (props.metadata.atomics.some((a) => a.type === type)) continue; - else if (type === "boolean") - insert( - application_boolean<"3.0">( - MetadataAtomic.create({ - type: "boolean", - tags: [], - }), - )[0]!, - ); - else if (type === "bigint") - insert( - application_bigint( - MetadataAtomic.create({ - type: "bigint", - tags: [], - }), - )[0]!, - ); - else if (type === "number") - insert( - application_number( - MetadataAtomic.create({ - type: "number", - tags: [], - }), - )[0]!, - ); - else if (type === "string") - insert( - application_string( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - )[0]!, - ); - } else insert(llm_schema_native(native)); - if (props.metadata.sets.length) insert(llm_schema_native("Set")); - if (props.metadata.maps.length) insert(llm_schema_native("Map")); - - // OBJECT - for (const object of props.metadata.objects) - if (object.recursive) - throw new Error( - "Error on LlmSchemaProgrammer.write(): LLM schema does not allow recursive object type.", - ); - else - insert( - llm_schema_object({ - object, - nullable: props.metadata.nullable, - }), - ); - - // ALIASES - for (const alias of props.metadata.aliases) - if (alias.recursive) - throw new Error( - "Error on LlmSchemaProgrammer.write(): LLM schema does not allow recursive alias type.", - ); - else - insert( - llm_schema_station({ - ...props, - metadata: alias.value, - }), - ); - - //---- - // RETURNS - //---- - if (union.length === 0 && props.blockNever === true) return null!; - const schema: ILlmSchema = - union.length === 0 - ? { type: undefined } - : union.length === 1 - ? union[0]! - : { oneOf: union }; - return { - ...schema, - ...props.attribute, - title: props.attribute.title ?? schema.title, - description: props.attribute.description ?? schema.description, - deprecated: props.attribute.deprecated ?? schema.deprecated, - }; -}; diff --git a/src/programmers/internal/llm_schema_tuple.ts b/src/programmers/internal/llm_schema_tuple.ts deleted file mode 100644 index 219920f0be..0000000000 --- a/src/programmers/internal/llm_schema_tuple.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; - -import { llm_schema_station } from "./llm_schema_station"; - -/** - * @internal - */ -export const llm_schema_tuple = (props: { - tuple: MetadataTuple; - attribute: ILlmSchema.__IAttribute; -}): ILlmSchema.IArray => ({ - ...props.attribute, - type: "array", - items: llm_schema_station({ - blockNever: false, - attribute: props.attribute, - metadata: props.tuple.type.elements.reduce( - (x, y) => Metadata.merge(x.rest ?? x, y.rest ?? y), - Metadata.initialize(), - ), - }), - minItems: !!props.tuple.type.elements.at(-1)?.rest - ? props.tuple.type.elements.length - 1 - : props.tuple.type.elements.filter((x) => !x.optional).length, - maxItems: !!props.tuple.type.elements.at(-1)?.rest - ? undefined! - : props.tuple.type.elements.length, -}); diff --git a/src/programmers/llm/LlmApplicationProgrammer.ts b/src/programmers/llm/LlmApplicationProgrammer.ts index 6e5801892b..da8a3da467 100644 --- a/src/programmers/llm/LlmApplicationProgrammer.ts +++ b/src/programmers/llm/LlmApplicationProgrammer.ts @@ -95,6 +95,7 @@ export namespace LlmApplicationProgrammer { ), options: { separate: null, + recursive: 3, }, }; }; diff --git a/src/programmers/llm/LlmSchemaProgrammer.ts b/src/programmers/llm/LlmSchemaProgrammer.ts index 953dc876a7..4742067ad8 100644 --- a/src/programmers/llm/LlmSchemaProgrammer.ts +++ b/src/programmers/llm/LlmSchemaProgrammer.ts @@ -1,9 +1,11 @@ import { ILlmSchema } from "@samchon/openapi"; +import { HttpLlmConverter } from "@samchon/openapi/lib/converters/HttpLlmConverter"; import { Metadata } from "../../schemas/metadata/Metadata"; +import { IJsonApplication } from "../../module"; import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { llm_schema_station } from "../internal/llm_schema_station"; +import { JsonApplicationProgrammer } from "../json/JsonApplicationProgrammer"; export namespace LlmSchemaProgrammer { export const validate = (meta: Metadata): string[] => { @@ -30,20 +32,27 @@ export namespace LlmSchemaProgrammer { native !== "File" ) output.push(`LLM schema does not support ${native} type.`); - if ( - meta.aliases.some((a) => a.recursive) || - meta.arrays.some((a) => a.type.recursive) || - meta.objects.some((o) => o.recursive) || - meta.tuples.some((t) => t.type.recursive) - ) - output.push("LLM schema does not support recursive type."); + // if ( + // meta.aliases.some((a) => a.recursive) || + // meta.arrays.some((a) => a.type.recursive) || + // meta.objects.some((o) => o.recursive) || + // meta.tuples.some((t) => t.type.recursive) + // ) + // output.push("LLM schema does not support recursive type."); return output; }; - export const write = (metadata: Metadata): ILlmSchema => - llm_schema_station({ - metadata, - blockNever: true, - attribute: {}, + export const write = (metadata: Metadata): ILlmSchema => { + const app: IJsonApplication<"3.1"> = JsonApplicationProgrammer.write<"3.1">( + "3.1", + )([metadata]) as IJsonApplication<"3.1">; + const schema: ILlmSchema | null | null = HttpLlmConverter.schema({ + components: app.components, + schema: app.schemas[0]!, + recursive: 3, }); + if (schema === null) + throw new Error("Failed to convert JSON schema to LLM schema."); + return schema; + }; } diff --git a/test-esm/package.json b/test-esm/package.json index 2a24a0d4d5..b71dca240e 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-6.11.4.tgz" + "typia": "../typia-6.12.0.tgz" } } \ No newline at end of file diff --git a/test/build/internal/TestLlmSchemaGenerator.ts b/test/build/internal/TestLlmSchemaGenerator.ts index 0746d6a3a7..5343165516 100644 --- a/test/build/internal/TestLlmSchemaGenerator.ts +++ b/test/build/internal/TestLlmSchemaGenerator.ts @@ -16,7 +16,7 @@ export namespace TestLlmSchemaGenerator { async function application(structures: TestStructure[]): Promise { for (const s of structures) { if (s.JSONABLE === false) continue; - else if (s.RECURSIVE === true) continue; + else if (s.name === "UltimateUnion") continue; const content: string[] = [ `import typia from "typia";`, diff --git a/test/package.json b/test/package.json index 66ba2191d9..4bb9dc0e33 100644 --- a/test/package.json +++ b/test/package.json @@ -52,6 +52,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.11.4.tgz" + "typia": "../typia-6.12.0.tgz" } } \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayAny.json b/test/schemas/llm/type/ArrayAny.json index 02eebb6050..b99c6d056f 100644 --- a/test/schemas/llm/type/ArrayAny.json +++ b/test/schemas/llm/type/ArrayAny.json @@ -43,7 +43,6 @@ "items": {} } }, - "nullable": false, "required": [ "anys", "nullables1", diff --git a/test/schemas/llm/type/ArrayHierarchical.json b/test/schemas/llm/type/ArrayHierarchical.json index e059d53905..f7fc8f9fb0 100644 --- a/test/schemas/llm/type/ArrayHierarchical.json +++ b/test/schemas/llm/type/ArrayHierarchical.json @@ -22,7 +22,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -53,7 +52,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -87,7 +85,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -95,7 +92,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "name", @@ -107,7 +103,6 @@ } } }, - "nullable": false, "required": [ "id", "code", @@ -119,7 +114,6 @@ } } }, - "nullable": false, "required": [ "id", "serial", diff --git a/test/schemas/llm/type/ArrayHierarchicalPointer.json b/test/schemas/llm/type/ArrayHierarchicalPointer.json index 58150122bf..751bf3fbf3 100644 --- a/test/schemas/llm/type/ArrayHierarchicalPointer.json +++ b/test/schemas/llm/type/ArrayHierarchicalPointer.json @@ -25,7 +25,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -56,7 +55,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -90,7 +88,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -98,7 +95,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "name", @@ -110,7 +106,6 @@ } } }, - "nullable": false, "required": [ "id", "code", @@ -122,7 +117,6 @@ } } }, - "nullable": false, "required": [ "id", "serial", @@ -134,7 +128,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ArrayRecursive.json b/test/schemas/llm/type/ArrayRecursive.json new file mode 100644 index 0000000000..878fb3cb3e --- /dev/null +++ b/test/schemas/llm/type/ArrayRecursive.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "additionalProperties": false + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "additionalProperties": false + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "additionalProperties": false + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRecursiveUnionExplicit.json b/test/schemas/llm/type/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..d94a6bfb22 --- /dev/null +++ b/test/schemas/llm/type/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,1806 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm/type/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..fa04076360 --- /dev/null +++ b/test/schemas/llm/type/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,1905 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "jpg" + ] + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "txt" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "zip" + ] + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRecursiveUnionImplicit.json b/test/schemas/llm/type/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..34ed201016 --- /dev/null +++ b/test/schemas/llm/type/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,3154 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": {}, + "maxItems": 0 + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "url": { + "type": "string" + }, + "size": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRepeatedNullable.json b/test/schemas/llm/type/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..463e614133 --- /dev/null +++ b/test/schemas/llm/type/ArrayRepeatedNullable.json @@ -0,0 +1,66 @@ +{ + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "array", + "items": {}, + "maxItems": 0, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRepeatedRequired.json b/test/schemas/llm/type/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..3d6810bfb3 --- /dev/null +++ b/test/schemas/llm/type/ArrayRepeatedRequired.json @@ -0,0 +1,54 @@ +{ + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": {}, + "maxItems": 0 + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRepeatedUnion.json b/test/schemas/llm/type/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..db3fec1e55 --- /dev/null +++ b/test/schemas/llm/type/ArrayRepeatedUnion.json @@ -0,0 +1,458 @@ +{ + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": {}, + "maxItems": 0 + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json b/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json new file mode 100644 index 0000000000..f1f5a83f6b --- /dev/null +++ b/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json @@ -0,0 +1,1014 @@ +{ + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": {}, + "maxItems": 0 + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArraySimple.json b/test/schemas/llm/type/ArraySimple.json index d23bc9decc..336f2a1009 100644 --- a/test/schemas/llm/type/ArraySimple.json +++ b/test/schemas/llm/type/ArraySimple.json @@ -24,7 +24,6 @@ "type": "number" } }, - "nullable": false, "required": [ "name", "body", @@ -34,7 +33,6 @@ } } }, - "nullable": false, "required": [ "name", "email", diff --git a/test/schemas/llm/type/AtomicClass.json b/test/schemas/llm/type/AtomicClass.json index 74c0cf600a..3fdc058a5a 100644 --- a/test/schemas/llm/type/AtomicClass.json +++ b/test/schemas/llm/type/AtomicClass.json @@ -5,9 +5,27 @@ { "type": "boolean" }, + { + "type": "boolean" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, { "type": "number" }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "string" + }, { "type": "string" } diff --git a/test/schemas/llm/type/ClassGetter.json b/test/schemas/llm/type/ClassGetter.json index 4e88789b83..b5bee62d8a 100644 --- a/test/schemas/llm/type/ClassGetter.json +++ b/test/schemas/llm/type/ClassGetter.json @@ -12,7 +12,6 @@ "nullable": true } }, - "nullable": false, "required": [ "id", "name", diff --git a/test/schemas/llm/type/ClassMethod.json b/test/schemas/llm/type/ClassMethod.json index 09abb292a0..a7d695f7f4 100644 --- a/test/schemas/llm/type/ClassMethod.json +++ b/test/schemas/llm/type/ClassMethod.json @@ -8,7 +8,6 @@ "type": "number" } }, - "nullable": false, "required": [ "name", "age" diff --git a/test/schemas/llm/type/ClassPropertyAssignment.json b/test/schemas/llm/type/ClassPropertyAssignment.json index f7d574ed28..79dd00dd80 100644 --- a/test/schemas/llm/type/ClassPropertyAssignment.json +++ b/test/schemas/llm/type/ClassPropertyAssignment.json @@ -23,7 +23,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "id", "name", diff --git a/test/schemas/llm/type/CommentTagArray.json b/test/schemas/llm/type/CommentTagArray.json index 5af2c03d7e..2cde513d93 100644 --- a/test/schemas/llm/type/CommentTagArray.json +++ b/test/schemas/llm/type/CommentTagArray.json @@ -45,7 +45,6 @@ "uniqueItems": true } }, - "nullable": false, "required": [ "items", "minItems", @@ -57,7 +56,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/CommentTagArrayUnion.json b/test/schemas/llm/type/CommentTagArrayUnion.json index dd2cdb4a38..94ad2c53ce 100644 --- a/test/schemas/llm/type/CommentTagArrayUnion.json +++ b/test/schemas/llm/type/CommentTagArrayUnion.json @@ -41,7 +41,6 @@ "maxItems": 7 } }, - "nullable": false, "required": [ "items", "minItems", diff --git a/test/schemas/llm/type/CommentTagAtomicUnion.json b/test/schemas/llm/type/CommentTagAtomicUnion.json index 74dfb96eac..4d814e123d 100644 --- a/test/schemas/llm/type/CommentTagAtomicUnion.json +++ b/test/schemas/llm/type/CommentTagAtomicUnion.json @@ -20,7 +20,6 @@ ] } }, - "nullable": false, "required": [ "value" ], @@ -28,7 +27,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/CommentTagDefault.json b/test/schemas/llm/type/CommentTagDefault.json index b6b26fe0f8..222261f60d 100644 --- a/test/schemas/llm/type/CommentTagDefault.json +++ b/test/schemas/llm/type/CommentTagDefault.json @@ -32,9 +32,7 @@ { "type": "boolean" } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." + ] }, "union_but_boolean": { "oneOf": [ @@ -47,9 +45,7 @@ { "type": "boolean" } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." + ] }, "union_but_number": { "oneOf": [ @@ -62,9 +58,7 @@ { "type": "boolean" } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." + ] }, "union_but_string": { "oneOf": [ @@ -77,9 +71,7 @@ { "type": "boolean" } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." + ] }, "vulnerable_range": { "type": "number", @@ -100,12 +92,9 @@ { "type": "boolean" } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." + ] } }, - "nullable": false, "required": [ "boolean", "number", diff --git a/test/schemas/llm/type/CommentTagFormat.json b/test/schemas/llm/type/CommentTagFormat.json index e6c0490fb9..3822e1a6bd 100644 --- a/test/schemas/llm/type/CommentTagFormat.json +++ b/test/schemas/llm/type/CommentTagFormat.json @@ -90,7 +90,6 @@ "format": "relative-json-pointer" } }, - "nullable": false, "required": [ "byte", "password", diff --git a/test/schemas/llm/type/CommentTagLength.json b/test/schemas/llm/type/CommentTagLength.json index 93a74ae740..79018d4b80 100644 --- a/test/schemas/llm/type/CommentTagLength.json +++ b/test/schemas/llm/type/CommentTagLength.json @@ -30,7 +30,6 @@ "maxLength": 19 } }, - "nullable": false, "required": [ "fixed", "minimum", @@ -42,7 +41,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/CommentTagObjectUnion.json b/test/schemas/llm/type/CommentTagObjectUnion.json index 1446b448ca..ec0ecdcc99 100644 --- a/test/schemas/llm/type/CommentTagObjectUnion.json +++ b/test/schemas/llm/type/CommentTagObjectUnion.json @@ -10,7 +10,6 @@ "minimum": 3 } }, - "nullable": false, "required": [ "value" ], @@ -25,7 +24,6 @@ "maxLength": 7 } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/CommentTagPattern.json b/test/schemas/llm/type/CommentTagPattern.json index 7fac2381f6..fb2e985935 100644 --- a/test/schemas/llm/type/CommentTagPattern.json +++ b/test/schemas/llm/type/CommentTagPattern.json @@ -18,7 +18,6 @@ "pattern": "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$" } }, - "nullable": false, "required": [ "uuid", "email", diff --git a/test/schemas/llm/type/CommentTagRange.json b/test/schemas/llm/type/CommentTagRange.json index a1c5607b3d..f81fad64de 100644 --- a/test/schemas/llm/type/CommentTagRange.json +++ b/test/schemas/llm/type/CommentTagRange.json @@ -54,7 +54,6 @@ "maximum": 10 } }, - "nullable": false, "required": [ "greater", "greater_equal", @@ -70,7 +69,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/CommentTagType.json b/test/schemas/llm/type/CommentTagType.json index 6a67b94ef2..bcf8e19203 100644 --- a/test/schemas/llm/type/CommentTagType.json +++ b/test/schemas/llm/type/CommentTagType.json @@ -32,7 +32,6 @@ "type": "number" } }, - "nullable": false, "required": [ "int", "uint", @@ -46,7 +45,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ConstantAtomicAbsorbed.json b/test/schemas/llm/type/ConstantAtomicAbsorbed.json index e02ba071fa..f68ef2131d 100644 --- a/test/schemas/llm/type/ConstantAtomicAbsorbed.json +++ b/test/schemas/llm/type/ConstantAtomicAbsorbed.json @@ -10,7 +10,6 @@ "default": 20 } }, - "nullable": false, "required": [ "id", "age" diff --git a/test/schemas/llm/type/ConstantAtomicTagged.json b/test/schemas/llm/type/ConstantAtomicTagged.json index e6d4c40a7c..1f07983818 100644 --- a/test/schemas/llm/type/ConstantAtomicTagged.json +++ b/test/schemas/llm/type/ConstantAtomicTagged.json @@ -2,35 +2,27 @@ "type": "object", "properties": { "id": { - "oneOf": [ - { - "type": "string", - "enum": [ - "latest" - ] - }, - { - "type": "string", - "format": "uuid" - } + "type": "string", + "format": "uuid", + "enum": [ + "latest" ] }, "age": { "oneOf": [ + { + "type": "integer", + "maximum": 100 + }, { "type": "number", "enum": [ -1 ] - }, - { - "type": "integer", - "maximum": 100 } ] } }, - "nullable": false, "required": [ "id", "age" diff --git a/test/schemas/llm/type/ConstantAtomicUnion.json b/test/schemas/llm/type/ConstantAtomicUnion.json index 329cfc5c67..db2bff38b0 100644 --- a/test/schemas/llm/type/ConstantAtomicUnion.json +++ b/test/schemas/llm/type/ConstantAtomicUnion.json @@ -2,6 +2,21 @@ "type": "array", "items": { "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, { "type": "boolean", "enum": [ @@ -21,22 +36,6 @@ "three", "four" ] - }, - { - "type": "object", - "properties": { - "key": { - "type": "string", - "enum": [ - "key" - ] - } - }, - "nullable": false, - "required": [ - "key" - ], - "additionalProperties": false } ] } diff --git a/test/schemas/llm/type/ConstantAtomicWrapper.json b/test/schemas/llm/type/ConstantAtomicWrapper.json index d7267606f7..40280bd787 100644 --- a/test/schemas/llm/type/ConstantAtomicWrapper.json +++ b/test/schemas/llm/type/ConstantAtomicWrapper.json @@ -9,7 +9,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "value" ], @@ -22,7 +21,6 @@ "type": "number" } }, - "nullable": false, "required": [ "value" ], @@ -35,7 +33,6 @@ "type": "string" } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/DynamicArray.json b/test/schemas/llm/type/DynamicArray.json index 38999e2bf2..812b3a514c 100644 --- a/test/schemas/llm/type/DynamicArray.json +++ b/test/schemas/llm/type/DynamicArray.json @@ -4,7 +4,6 @@ "value": { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": { "type": "array", "items": { @@ -13,7 +12,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/DynamicComposite.json b/test/schemas/llm/type/DynamicComposite.json index 27209c891d..2bd79fa6b3 100644 --- a/test/schemas/llm/type/DynamicComposite.json +++ b/test/schemas/llm/type/DynamicComposite.json @@ -8,7 +8,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "name" diff --git a/test/schemas/llm/type/DynamicConstant.json b/test/schemas/llm/type/DynamicConstant.json index 3e90cb771e..dce929abac 100644 --- a/test/schemas/llm/type/DynamicConstant.json +++ b/test/schemas/llm/type/DynamicConstant.json @@ -17,7 +17,6 @@ "type": "number" } }, - "nullable": false, "required": [ "a", "b", @@ -27,7 +26,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/DynamicEnumeration.json b/test/schemas/llm/type/DynamicEnumeration.json index 05f8272e1a..c2922e86e2 100644 --- a/test/schemas/llm/type/DynamicEnumeration.json +++ b/test/schemas/llm/type/DynamicEnumeration.json @@ -35,11 +35,9 @@ "type": "string" } }, - "nullable": false, "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/DynamicNever.json b/test/schemas/llm/type/DynamicNever.json index 73ceffc0d9..489a1b629f 100644 --- a/test/schemas/llm/type/DynamicNever.json +++ b/test/schemas/llm/type/DynamicNever.json @@ -1,6 +1,5 @@ { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": false } \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicSimple.json b/test/schemas/llm/type/DynamicSimple.json index 150815d722..85df503c55 100644 --- a/test/schemas/llm/type/DynamicSimple.json +++ b/test/schemas/llm/type/DynamicSimple.json @@ -4,13 +4,11 @@ "value": { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": { "type": "number" } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/DynamicTemplate.json b/test/schemas/llm/type/DynamicTemplate.json index 65aded246d..2775fa6af7 100644 --- a/test/schemas/llm/type/DynamicTemplate.json +++ b/test/schemas/llm/type/DynamicTemplate.json @@ -1,7 +1,6 @@ { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": { "oneOf": [ { diff --git a/test/schemas/llm/type/DynamicTree.json b/test/schemas/llm/type/DynamicTree.json new file mode 100644 index 0000000000..fe3e2906aa --- /dev/null +++ b/test/schemas/llm/type/DynamicTree.json @@ -0,0 +1,89 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": false + } + }, + "required": [ + "id", + "sequence", + "children" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "sequence", + "children" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "sequence", + "children" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "sequence", + "children" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicUndefined.json b/test/schemas/llm/type/DynamicUndefined.json index 73ceffc0d9..489a1b629f 100644 --- a/test/schemas/llm/type/DynamicUndefined.json +++ b/test/schemas/llm/type/DynamicUndefined.json @@ -1,6 +1,5 @@ { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": false } \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicUnion.json b/test/schemas/llm/type/DynamicUnion.json index 8bbb070407..67d7443a86 100644 --- a/test/schemas/llm/type/DynamicUnion.json +++ b/test/schemas/llm/type/DynamicUnion.json @@ -1,7 +1,6 @@ { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": { "oneOf": [ { diff --git a/test/schemas/llm/type/ObjectAlias.json b/test/schemas/llm/type/ObjectAlias.json index 1c9513f5d6..81267b0f6d 100644 --- a/test/schemas/llm/type/ObjectAlias.json +++ b/test/schemas/llm/type/ObjectAlias.json @@ -42,7 +42,6 @@ "nullable": true } }, - "nullable": false, "required": [ "id", "email", diff --git a/test/schemas/llm/type/ObjectDate.json b/test/schemas/llm/type/ObjectDate.json index 45c565b721..fb19e12abf 100644 --- a/test/schemas/llm/type/ObjectDate.json +++ b/test/schemas/llm/type/ObjectDate.json @@ -27,7 +27,6 @@ "nullable": true } }, - "nullable": false, "required": [ "date", "datetime", diff --git a/test/schemas/llm/type/ObjectDescription.json b/test/schemas/llm/type/ObjectDescription.json index f313845bbc..8b23dbd652 100644 --- a/test/schemas/llm/type/ObjectDescription.json +++ b/test/schemas/llm/type/ObjectDescription.json @@ -9,7 +9,6 @@ }, "deprecated": { "type": "boolean", - "deprecated": true, "title": "Deprecated property", "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." }, @@ -31,7 +30,6 @@ "description": "New line before dot character\n\nIf dot character (\".\") being used before the first new line, it would not\nbe considered as title in the JSON schema." } }, - "nullable": false, "required": [ "id", "deprecated", diff --git a/test/schemas/llm/type/ObjectDynamic.json b/test/schemas/llm/type/ObjectDynamic.json index 65aded246d..2775fa6af7 100644 --- a/test/schemas/llm/type/ObjectDynamic.json +++ b/test/schemas/llm/type/ObjectDynamic.json @@ -1,7 +1,6 @@ { "type": "object", "properties": {}, - "nullable": false, "additionalProperties": { "oneOf": [ { diff --git a/test/schemas/llm/type/ObjectGeneric.json b/test/schemas/llm/type/ObjectGeneric.json index 7a7f8c31f3..cddbd97bbb 100644 --- a/test/schemas/llm/type/ObjectGeneric.json +++ b/test/schemas/llm/type/ObjectGeneric.json @@ -18,7 +18,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -37,7 +36,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -46,7 +44,6 @@ } } }, - "nullable": false, "required": [ "value", "child", @@ -70,7 +67,6 @@ "type": "number" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -89,7 +85,6 @@ "type": "number" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -98,7 +93,6 @@ } } }, - "nullable": false, "required": [ "value", "child", @@ -122,7 +116,6 @@ "type": "string" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -141,7 +134,6 @@ "type": "string" } }, - "nullable": false, "required": [ "child_value", "child_next" @@ -150,7 +142,6 @@ } } }, - "nullable": false, "required": [ "value", "child", diff --git a/test/schemas/llm/type/ObjectGenericAlias.json b/test/schemas/llm/type/ObjectGenericAlias.json index c9d42a3991..2d8299f1ed 100644 --- a/test/schemas/llm/type/ObjectGenericAlias.json +++ b/test/schemas/llm/type/ObjectGenericAlias.json @@ -5,7 +5,6 @@ "type": "string" } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectGenericArray.json b/test/schemas/llm/type/ObjectGenericArray.json index 191df3ba1a..6697631b9d 100644 --- a/test/schemas/llm/type/ObjectGenericArray.json +++ b/test/schemas/llm/type/ObjectGenericArray.json @@ -17,7 +17,6 @@ "type": "number" } }, - "nullable": false, "required": [ "page", "limit", @@ -38,7 +37,6 @@ "type": "number" } }, - "nullable": false, "required": [ "name", "age" @@ -47,7 +45,6 @@ } } }, - "nullable": false, "required": [ "pagination", "data" diff --git a/test/schemas/llm/type/ObjectGenericUnion.json b/test/schemas/llm/type/ObjectGenericUnion.json index 9b33d24d84..495ed57f98 100644 --- a/test/schemas/llm/type/ObjectGenericUnion.json +++ b/test/schemas/llm/type/ObjectGenericUnion.json @@ -51,7 +51,6 @@ "type": "string" } }, - "nullable": false, "required": [ "name", "extension", @@ -61,7 +60,6 @@ } } }, - "nullable": false, "required": [ "id", "created_at", @@ -76,14 +74,14 @@ "type": "string" } }, - "nullable": true, "required": [ "id", "hit", "contents", "created_at" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "id": { "type": "string" @@ -124,7 +122,6 @@ "type": "string" } }, - "nullable": false, "required": [ "name", "extension", @@ -134,7 +131,6 @@ } } }, - "nullable": false, "required": [ "id", "created_at", @@ -149,7 +145,6 @@ "type": "string" } }, - "nullable": false, "required": [ "writer", "answer", @@ -208,7 +203,6 @@ "type": "string" } }, - "nullable": false, "required": [ "name", "extension", @@ -218,7 +212,6 @@ } } }, - "nullable": false, "required": [ "id", "created_at", @@ -233,14 +226,14 @@ "type": "string" } }, - "nullable": true, "required": [ "id", "hit", "contents", "created_at" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "id": { "type": "string" @@ -284,7 +277,6 @@ "type": "string" } }, - "nullable": false, "required": [ "name", "extension", @@ -294,7 +286,6 @@ } } }, - "nullable": false, "required": [ "score", "id", @@ -310,7 +301,6 @@ "type": "string" } }, - "nullable": false, "required": [ "writer", "answer", @@ -324,7 +314,6 @@ ] } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectHierarchical.json b/test/schemas/llm/type/ObjectHierarchical.json index f159f592f5..9c9c70d17d 100644 --- a/test/schemas/llm/type/ObjectHierarchical.json +++ b/test/schemas/llm/type/ObjectHierarchical.json @@ -35,7 +35,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -43,7 +42,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "code", @@ -80,7 +78,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -88,7 +85,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "code", @@ -121,7 +117,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -129,7 +124,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "code", @@ -153,7 +147,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -161,7 +154,6 @@ "additionalProperties": false } }, - "nullable": true, "required": [ "id", "account", @@ -169,7 +161,8 @@ "grade", "created_at" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "emails": { "type": "array", @@ -187,7 +180,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -198,7 +190,6 @@ "type": "boolean" } }, - "nullable": true, "required": [ "id", "account", @@ -207,7 +198,8 @@ "created_at", "authorized" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "account": { "type": "object", @@ -228,7 +220,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -236,13 +227,13 @@ "additionalProperties": false } }, - "nullable": true, "required": [ "id", "code", "created_at" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "href": { "type": "string" @@ -253,7 +244,20 @@ "ip": { "type": "array", "items": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] }, "minItems": 4, "maxItems": 4 @@ -268,7 +272,6 @@ "type": "number" } }, - "nullable": false, "required": [ "time", "zone" @@ -276,7 +279,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "id", "channel", diff --git a/test/schemas/llm/type/ObjectInternal.json b/test/schemas/llm/type/ObjectInternal.json index 4d3dd5c6da..309fcac1ef 100644 --- a/test/schemas/llm/type/ObjectInternal.json +++ b/test/schemas/llm/type/ObjectInternal.json @@ -8,7 +8,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "name" diff --git a/test/schemas/llm/type/ObjectIntersection.json b/test/schemas/llm/type/ObjectIntersection.json index 09d958dabc..b45b8ea364 100644 --- a/test/schemas/llm/type/ObjectIntersection.json +++ b/test/schemas/llm/type/ObjectIntersection.json @@ -11,7 +11,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "email", "name", diff --git a/test/schemas/llm/type/ObjectJsonTag.json b/test/schemas/llm/type/ObjectJsonTag.json index 878aed71ac..2bcdd45888 100644 --- a/test/schemas/llm/type/ObjectJsonTag.json +++ b/test/schemas/llm/type/ObjectJsonTag.json @@ -21,7 +21,6 @@ "description": "Complicate title." } }, - "nullable": false, "required": [ "vulnerable", "description", diff --git a/test/schemas/llm/type/ObjectLiteralProperty.json b/test/schemas/llm/type/ObjectLiteralProperty.json index 3c609f573b..7fbbd90150 100644 --- a/test/schemas/llm/type/ObjectLiteralProperty.json +++ b/test/schemas/llm/type/ObjectLiteralProperty.json @@ -8,7 +8,6 @@ "type": "string" } }, - "nullable": false, "required": [ "something-interesting-do-you-want?", "or-something-crazy-do-you-want?" diff --git a/test/schemas/llm/type/ObjectLiteralType.json b/test/schemas/llm/type/ObjectLiteralType.json index eca617e2ee..4cc6ebbfde 100644 --- a/test/schemas/llm/type/ObjectLiteralType.json +++ b/test/schemas/llm/type/ObjectLiteralType.json @@ -11,7 +11,6 @@ "type": "number" } }, - "nullable": false, "required": [ "id", "name", diff --git a/test/schemas/llm/type/ObjectNullable.json b/test/schemas/llm/type/ObjectNullable.json index aea4b6ee2f..e05f776ac2 100644 --- a/test/schemas/llm/type/ObjectNullable.json +++ b/test/schemas/llm/type/ObjectNullable.json @@ -22,7 +22,6 @@ "type": "string" } }, - "nullable": false, "required": [ "type", "name" @@ -42,12 +41,12 @@ "type": "string" } }, - "nullable": true, "required": [ "type", "name" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, "similar": { "oneOf": [ @@ -64,12 +63,12 @@ "type": "string" } }, - "nullable": true, "required": [ "type", "name" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true }, { "type": "object", @@ -84,17 +83,16 @@ "type": "string" } }, - "nullable": true, "required": [ "type", "name" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true } ] } }, - "nullable": false, "required": [ "name", "manufacturer", @@ -105,7 +103,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectOptional.json b/test/schemas/llm/type/ObjectOptional.json index aea96f579b..c6312f9350 100644 --- a/test/schemas/llm/type/ObjectOptional.json +++ b/test/schemas/llm/type/ObjectOptional.json @@ -14,6 +14,5 @@ "type": "number" } }, - "nullable": false, "additionalProperties": false } \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectPartial.json b/test/schemas/llm/type/ObjectPartial.json new file mode 100644 index 0000000000..9221418cf7 --- /dev/null +++ b/test/schemas/llm/type/ObjectPartial.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "null" + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "description": "Make all properties in T optional", + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectPartialAndRequired.json b/test/schemas/llm/type/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..3c341d0fb1 --- /dev/null +++ b/test/schemas/llm/type/ObjectPartialAndRequired.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "type": "null" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectPrimitive.json b/test/schemas/llm/type/ObjectPrimitive.json index b1ff6746d2..3e8ddfed05 100644 --- a/test/schemas/llm/type/ObjectPrimitive.json +++ b/test/schemas/llm/type/ObjectPrimitive.json @@ -39,7 +39,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "name", @@ -57,7 +56,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "extension", diff --git a/test/schemas/llm/type/ObjectPropertyNullable.json b/test/schemas/llm/type/ObjectPropertyNullable.json index 6bc4a2453d..ee3cf48c93 100644 --- a/test/schemas/llm/type/ObjectPropertyNullable.json +++ b/test/schemas/llm/type/ObjectPropertyNullable.json @@ -12,7 +12,6 @@ "nullable": true } }, - "nullable": false, "required": [ "value" ], @@ -29,7 +28,6 @@ "nullable": true } }, - "nullable": false, "required": [ "value" ], @@ -46,7 +44,6 @@ "nullable": true } }, - "nullable": false, "required": [ "value" ], @@ -80,16 +77,15 @@ "nullable": true } }, - "nullable": true, "required": [ "id", "name", "activated" ], - "additionalProperties": false + "additionalProperties": false, + "nullable": true } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectRecursive.json b/test/schemas/llm/type/ObjectRecursive.json new file mode 100644 index 0000000000..1bd78b6432 --- /dev/null +++ b/test/schemas/llm/type/ObjectRecursive.json @@ -0,0 +1,174 @@ +{ + "type": "object", + "properties": { + "parent": { + "type": "object", + "properties": { + "parent": { + "type": "object", + "properties": { + "parent": { + "type": "object", + "properties": { + "parent": { + "type": "null" + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectRequired.json b/test/schemas/llm/type/ObjectRequired.json new file mode 100644 index 0000000000..cfb27069de --- /dev/null +++ b/test/schemas/llm/type/ObjectRequired.json @@ -0,0 +1,120 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "type": "null" + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required", + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectSimple.json b/test/schemas/llm/type/ObjectSimple.json index d0d8f9bab3..b179cbf925 100644 --- a/test/schemas/llm/type/ObjectSimple.json +++ b/test/schemas/llm/type/ObjectSimple.json @@ -14,7 +14,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y", @@ -35,7 +34,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y", @@ -56,7 +54,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y", @@ -77,7 +74,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y", @@ -86,7 +82,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "scale", "position", diff --git a/test/schemas/llm/type/ObjectTuple.json b/test/schemas/llm/type/ObjectTuple.json index 3d5f863746..44476b6d4b 100644 --- a/test/schemas/llm/type/ObjectTuple.json +++ b/test/schemas/llm/type/ObjectTuple.json @@ -15,7 +15,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "code", @@ -36,7 +35,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "mobile", diff --git a/test/schemas/llm/type/ObjectUndefined.json b/test/schemas/llm/type/ObjectUndefined.json index 7993ea1205..ee725cd768 100644 --- a/test/schemas/llm/type/ObjectUndefined.json +++ b/test/schemas/llm/type/ObjectUndefined.json @@ -26,7 +26,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "name" @@ -38,7 +37,6 @@ }, "unknown": {} }, - "nullable": false, "required": [ "name", "unknown" diff --git a/test/schemas/llm/type/ObjectUnionComposite.json b/test/schemas/llm/type/ObjectUnionComposite.json index 07f0becef9..923b42192f 100644 --- a/test/schemas/llm/type/ObjectUnionComposite.json +++ b/test/schemas/llm/type/ObjectUnionComposite.json @@ -12,7 +12,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -32,7 +31,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -49,7 +47,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -57,7 +54,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2" @@ -77,7 +73,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -94,7 +89,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -111,7 +105,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -119,7 +112,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2", @@ -140,7 +132,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -157,7 +148,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -174,7 +164,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -191,7 +180,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -199,7 +187,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2", @@ -223,7 +210,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -232,7 +218,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -253,7 +238,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -271,7 +255,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -279,7 +262,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "outer", "inner" @@ -304,7 +286,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -313,7 +294,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -336,7 +316,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -345,7 +324,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -353,7 +331,6 @@ } } }, - "nullable": false, "required": [ "outer", "inner" @@ -373,7 +350,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -384,7 +360,6 @@ "type": "number" } }, - "nullable": false, "required": [ "centroid", "radius" diff --git a/test/schemas/llm/type/ObjectUnionCompositePointer.json b/test/schemas/llm/type/ObjectUnionCompositePointer.json index 0c6de17811..d3b7f8e6e2 100644 --- a/test/schemas/llm/type/ObjectUnionCompositePointer.json +++ b/test/schemas/llm/type/ObjectUnionCompositePointer.json @@ -18,7 +18,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -38,7 +37,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -55,7 +53,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -63,7 +60,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2" @@ -83,7 +79,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -100,7 +95,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -117,7 +111,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -125,7 +118,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2", @@ -146,7 +138,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -163,7 +154,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -180,7 +170,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -197,7 +186,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -205,7 +193,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "p1", "p2", @@ -229,7 +216,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -238,7 +224,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -259,7 +244,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -277,7 +261,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -285,7 +268,6 @@ "additionalProperties": false } }, - "nullable": false, "required": [ "outer", "inner" @@ -310,7 +292,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -319,7 +300,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -342,7 +322,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -351,7 +330,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -359,7 +337,6 @@ } } }, - "nullable": false, "required": [ "outer", "inner" @@ -379,7 +356,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -390,7 +366,6 @@ "type": "number" } }, - "nullable": false, "required": [ "centroid", "radius" @@ -400,7 +375,6 @@ ] } }, - "nullable": false, "required": [ "value" ], @@ -408,7 +382,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectUnionDouble.json b/test/schemas/llm/type/ObjectUnionDouble.json index 2e874db660..aba4335ea4 100644 --- a/test/schemas/llm/type/ObjectUnionDouble.json +++ b/test/schemas/llm/type/ObjectUnionDouble.json @@ -12,7 +12,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x" ], @@ -30,14 +29,12 @@ "type": "number" } }, - "nullable": false, "required": [ "y" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -53,14 +50,12 @@ "type": "boolean" } }, - "nullable": false, "required": [ "y" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -69,7 +64,6 @@ ] } }, - "nullable": false, "required": [ "value", "child" @@ -86,7 +80,6 @@ "type": "string" } }, - "nullable": false, "required": [ "x" ], @@ -107,14 +100,12 @@ } } }, - "nullable": false, "required": [ "y" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -130,14 +121,12 @@ "type": "string" } }, - "nullable": false, "required": [ "y" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -146,7 +135,6 @@ ] } }, - "nullable": false, "required": [ "value", "child" diff --git a/test/schemas/llm/type/ObjectUnionExplicit.json b/test/schemas/llm/type/ObjectUnionExplicit.json index 55e4902bda..15ce93e2aa 100644 --- a/test/schemas/llm/type/ObjectUnionExplicit.json +++ b/test/schemas/llm/type/ObjectUnionExplicit.json @@ -18,7 +18,6 @@ ] } }, - "nullable": false, "required": [ "x", "y", @@ -39,7 +38,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -56,7 +54,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -70,7 +67,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -91,7 +87,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -108,7 +103,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -125,7 +119,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -139,7 +132,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -161,7 +153,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -178,7 +169,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -195,7 +185,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -212,7 +201,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -226,7 +214,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -251,7 +238,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -266,7 +252,6 @@ ] } }, - "nullable": false, "required": [ "points", "type" @@ -291,7 +276,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -300,7 +284,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -323,7 +306,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -332,7 +314,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -346,7 +327,6 @@ ] } }, - "nullable": false, "required": [ "outer", "inner", @@ -367,7 +347,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -384,7 +363,6 @@ ] } }, - "nullable": false, "required": [ "centroid", "radius", diff --git a/test/schemas/llm/type/ObjectUnionExplicitPointer.json b/test/schemas/llm/type/ObjectUnionExplicitPointer.json index 302a02c271..03e1419993 100644 --- a/test/schemas/llm/type/ObjectUnionExplicitPointer.json +++ b/test/schemas/llm/type/ObjectUnionExplicitPointer.json @@ -24,7 +24,6 @@ ] } }, - "nullable": false, "required": [ "x", "y", @@ -45,7 +44,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -62,7 +60,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -76,7 +73,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -97,7 +93,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -114,7 +109,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -131,7 +125,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -145,7 +138,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -167,7 +159,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -184,7 +175,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -201,7 +191,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -218,7 +207,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -232,7 +220,6 @@ ] } }, - "nullable": false, "required": [ "p1", "p2", @@ -257,7 +244,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -272,7 +258,6 @@ ] } }, - "nullable": false, "required": [ "points", "type" @@ -297,7 +282,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -306,7 +290,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -329,7 +312,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -338,7 +320,6 @@ } } }, - "nullable": false, "required": [ "points" ], @@ -352,7 +333,6 @@ ] } }, - "nullable": false, "required": [ "outer", "inner", @@ -373,7 +353,6 @@ "type": "number" } }, - "nullable": false, "required": [ "x", "y" @@ -390,7 +369,6 @@ ] } }, - "nullable": false, "required": [ "centroid", "radius", @@ -401,7 +379,6 @@ ] } }, - "nullable": false, "required": [ "value" ], @@ -409,7 +386,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ObjectUnionImplicit.json b/test/schemas/llm/type/ObjectUnionImplicit.json index f9eed14cbe..5f65db3530 100644 --- a/test/schemas/llm/type/ObjectUnionImplicit.json +++ b/test/schemas/llm/type/ObjectUnionImplicit.json @@ -16,7 +16,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -40,7 +39,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -61,7 +59,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -77,7 +74,6 @@ "nullable": true } }, - "nullable": false, "required": [ "p1", "p2" @@ -101,7 +97,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -122,7 +117,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -143,7 +137,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -163,7 +156,6 @@ "nullable": true } }, - "nullable": false, "required": [ "p1", "p2", @@ -188,7 +180,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -209,7 +200,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -230,7 +220,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -251,7 +240,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -271,7 +259,6 @@ "nullable": true } }, - "nullable": false, "required": [ "p1", "p2", @@ -299,7 +286,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -312,7 +298,6 @@ "nullable": true } }, - "nullable": false, "required": [ "points" ], @@ -340,7 +325,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -353,7 +337,6 @@ "nullable": true } }, - "nullable": false, "required": [ "points" ], @@ -380,7 +363,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -393,7 +375,6 @@ "nullable": true } }, - "nullable": false, "required": [ "points" ], @@ -405,7 +386,6 @@ "nullable": true } }, - "nullable": false, "required": [ "outer" ], @@ -431,7 +411,6 @@ "nullable": true } }, - "nullable": false, "required": [ "x", "y" @@ -443,7 +422,6 @@ "nullable": true } }, - "nullable": false, "required": [ "radius" ], diff --git a/test/schemas/llm/type/ObjectUnionNonPredictable.json b/test/schemas/llm/type/ObjectUnionNonPredictable.json index 79b805a005..e528c46244 100644 --- a/test/schemas/llm/type/ObjectUnionNonPredictable.json +++ b/test/schemas/llm/type/ObjectUnionNonPredictable.json @@ -21,14 +21,12 @@ "type": "boolean" } }, - "nullable": false, "required": [ "value" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -44,14 +42,12 @@ "type": "number" } }, - "nullable": false, "required": [ "value" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -67,14 +63,12 @@ "type": "string" } }, - "nullable": false, "required": [ "value" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -83,14 +77,12 @@ ] } }, - "nullable": false, "required": [ "value" ], "additionalProperties": false } }, - "nullable": false, "required": [ "value" ], @@ -98,7 +90,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TemplateAtomic.json b/test/schemas/llm/type/TemplateAtomic.json index 1e340986d5..99e3f3ba0f 100644 --- a/test/schemas/llm/type/TemplateAtomic.json +++ b/test/schemas/llm/type/TemplateAtomic.json @@ -37,7 +37,6 @@ "pattern": "((.*)@(.*)\\.(.*))" } }, - "nullable": false, "required": [ "prefix", "postfix", diff --git a/test/schemas/llm/type/TemplateConstant.json b/test/schemas/llm/type/TemplateConstant.json index ac5c8fb50e..ee1d4625eb 100644 --- a/test/schemas/llm/type/TemplateConstant.json +++ b/test/schemas/llm/type/TemplateConstant.json @@ -37,7 +37,6 @@ ] } }, - "nullable": false, "required": [ "prefix", "postfix", @@ -47,7 +46,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TemplateUnion.json b/test/schemas/llm/type/TemplateUnion.json index 6b8d3c6186..ae3c5031ab 100644 --- a/test/schemas/llm/type/TemplateUnion.json +++ b/test/schemas/llm/type/TemplateUnion.json @@ -15,28 +15,18 @@ "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" }, "middle": { - "oneOf": [ - { - "type": "string", - "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" - }, - { - "type": "string", - "enum": [ - "the_false_value", - "the_true_value" - ] - } + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_false_value", + "the_true_value" ] }, "mixed": { "oneOf": [ { "type": "string", - "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" - }, - { - "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", "enum": [ "the_A_value", "the_B_value" @@ -55,7 +45,6 @@ "type": "string" } }, - "nullable": false, "required": [ "name" ], @@ -64,7 +53,6 @@ ] } }, - "nullable": false, "required": [ "prefix", "postfix", @@ -75,7 +63,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/ToJsonArray.json b/test/schemas/llm/type/ToJsonArray.json index aadd100701..b658eaa689 100644 --- a/test/schemas/llm/type/ToJsonArray.json +++ b/test/schemas/llm/type/ToJsonArray.json @@ -29,7 +29,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id" ], diff --git a/test/schemas/llm/type/ToJsonDouble.json b/test/schemas/llm/type/ToJsonDouble.json index 1ca40df9f2..4ab2083b3f 100644 --- a/test/schemas/llm/type/ToJsonDouble.json +++ b/test/schemas/llm/type/ToJsonDouble.json @@ -8,7 +8,6 @@ "type": "boolean" } }, - "nullable": false, "required": [ "id", "flag" diff --git a/test/schemas/llm/type/ToJsonTuple.json b/test/schemas/llm/type/ToJsonTuple.json index 8ff2d67875..c6b416cb68 100644 --- a/test/schemas/llm/type/ToJsonTuple.json +++ b/test/schemas/llm/type/ToJsonTuple.json @@ -21,7 +21,6 @@ "type": "string" } }, - "nullable": false, "required": [ "code", "name" diff --git a/test/schemas/llm/type/ToJsonUnion.json b/test/schemas/llm/type/ToJsonUnion.json index dd9bdffba2..0a6e5c1e75 100644 --- a/test/schemas/llm/type/ToJsonUnion.json +++ b/test/schemas/llm/type/ToJsonUnion.json @@ -18,7 +18,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "mobile", @@ -39,7 +38,6 @@ "type": "string" } }, - "nullable": false, "required": [ "manufacturer", "brand", @@ -66,7 +64,6 @@ "type": "string" } }, - "nullable": false, "required": [ "id", "mobile", diff --git a/test/schemas/llm/type/TupleHierarchical.json b/test/schemas/llm/type/TupleHierarchical.json index 1c3b3258e8..d0cbf97175 100644 --- a/test/schemas/llm/type/TupleHierarchical.json +++ b/test/schemas/llm/type/TupleHierarchical.json @@ -77,6 +77,9 @@ "type": "array", "items": { "oneOf": [ + { + "type": "number" + }, { "type": "number" }, diff --git a/test/schemas/llm/type/TupleRestArray.json b/test/schemas/llm/type/TupleRestArray.json index 98b9dcf82e..82cd4e2539 100644 --- a/test/schemas/llm/type/TupleRestArray.json +++ b/test/schemas/llm/type/TupleRestArray.json @@ -16,5 +16,6 @@ } ] }, - "minItems": 2 + "minItems": 2, + "maxItems": 2 } \ No newline at end of file diff --git a/test/schemas/llm/type/TupleRestAtomic.json b/test/schemas/llm/type/TupleRestAtomic.json index e0857629a7..f7f2b00d92 100644 --- a/test/schemas/llm/type/TupleRestAtomic.json +++ b/test/schemas/llm/type/TupleRestAtomic.json @@ -13,5 +13,6 @@ } ] }, - "minItems": 2 + "minItems": 2, + "maxItems": 2 } \ No newline at end of file diff --git a/test/schemas/llm/type/TupleRestObject.json b/test/schemas/llm/type/TupleRestObject.json index 055ce8f4ae..977cdc6136 100644 --- a/test/schemas/llm/type/TupleRestObject.json +++ b/test/schemas/llm/type/TupleRestObject.json @@ -15,7 +15,6 @@ "type": "string" } }, - "nullable": false, "required": [ "value" ], @@ -23,5 +22,6 @@ } ] }, - "minItems": 2 + "minItems": 2, + "maxItems": 2 } \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagArray.json b/test/schemas/llm/type/TypeTagArray.json index c693e2a88e..fd0d97b857 100644 --- a/test/schemas/llm/type/TypeTagArray.json +++ b/test/schemas/llm/type/TypeTagArray.json @@ -50,7 +50,6 @@ "uniqueItems": true } }, - "nullable": false, "required": [ "items", "minItems", @@ -62,7 +61,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TypeTagArrayUnion.json b/test/schemas/llm/type/TypeTagArrayUnion.json index 3a8d06bdc3..ce33f90c2d 100644 --- a/test/schemas/llm/type/TypeTagArrayUnion.json +++ b/test/schemas/llm/type/TypeTagArrayUnion.json @@ -46,7 +46,6 @@ "maxItems": 7 } }, - "nullable": false, "required": [ "items", "minItems", diff --git a/test/schemas/llm/type/TypeTagAtomicUnion.json b/test/schemas/llm/type/TypeTagAtomicUnion.json index 74dfb96eac..4d814e123d 100644 --- a/test/schemas/llm/type/TypeTagAtomicUnion.json +++ b/test/schemas/llm/type/TypeTagAtomicUnion.json @@ -20,7 +20,6 @@ ] } }, - "nullable": false, "required": [ "value" ], @@ -28,7 +27,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TypeTagCustom.json b/test/schemas/llm/type/TypeTagCustom.json index 1c15dbd63b..9f9c6e6cab 100644 --- a/test/schemas/llm/type/TypeTagCustom.json +++ b/test/schemas/llm/type/TypeTagCustom.json @@ -18,7 +18,6 @@ "x-typia-powerOf": 2 } }, - "nullable": false, "required": [ "id", "dollar", diff --git a/test/schemas/llm/type/TypeTagDefault.json b/test/schemas/llm/type/TypeTagDefault.json index f8f9c96ff4..8325218b4d 100644 --- a/test/schemas/llm/type/TypeTagDefault.json +++ b/test/schemas/llm/type/TypeTagDefault.json @@ -2,8 +2,7 @@ "type": "object", "properties": { "boolean": { - "type": "boolean", - "default": false + "type": "boolean" }, "number": { "type": "number", @@ -28,8 +27,7 @@ "default": "two" }, { - "type": "boolean", - "default": false + "type": "boolean" } ] }, @@ -42,8 +40,7 @@ "type": "number" }, { - "type": "boolean", - "default": false + "type": "boolean" } ] }, @@ -86,13 +83,11 @@ "default": 2 }, { - "type": "boolean", - "default": false + "type": "boolean" } ] } }, - "nullable": false, "required": [ "boolean", "number", diff --git a/test/schemas/llm/type/TypeTagFormat.json b/test/schemas/llm/type/TypeTagFormat.json index e6c0490fb9..3822e1a6bd 100644 --- a/test/schemas/llm/type/TypeTagFormat.json +++ b/test/schemas/llm/type/TypeTagFormat.json @@ -90,7 +90,6 @@ "format": "relative-json-pointer" } }, - "nullable": false, "required": [ "byte", "password", diff --git a/test/schemas/llm/type/TypeTagLength.json b/test/schemas/llm/type/TypeTagLength.json index 93a74ae740..79018d4b80 100644 --- a/test/schemas/llm/type/TypeTagLength.json +++ b/test/schemas/llm/type/TypeTagLength.json @@ -30,7 +30,6 @@ "maxLength": 19 } }, - "nullable": false, "required": [ "fixed", "minimum", @@ -42,7 +41,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TypeTagMatrix.json b/test/schemas/llm/type/TypeTagMatrix.json index 3d700518f3..716980859a 100644 --- a/test/schemas/llm/type/TypeTagMatrix.json +++ b/test/schemas/llm/type/TypeTagMatrix.json @@ -16,7 +16,6 @@ "maxItems": 3 } }, - "nullable": false, "required": [ "matrix" ], diff --git a/test/schemas/llm/type/TypeTagObjectUnion.json b/test/schemas/llm/type/TypeTagObjectUnion.json index 1446b448ca..ec0ecdcc99 100644 --- a/test/schemas/llm/type/TypeTagObjectUnion.json +++ b/test/schemas/llm/type/TypeTagObjectUnion.json @@ -10,7 +10,6 @@ "minimum": 3 } }, - "nullable": false, "required": [ "value" ], @@ -25,7 +24,6 @@ "maxLength": 7 } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TypeTagPattern.json b/test/schemas/llm/type/TypeTagPattern.json index eadf211e3e..f1d194ec67 100644 --- a/test/schemas/llm/type/TypeTagPattern.json +++ b/test/schemas/llm/type/TypeTagPattern.json @@ -18,7 +18,6 @@ "pattern": "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$" } }, - "nullable": false, "required": [ "uuid", "email", diff --git a/test/schemas/llm/type/TypeTagRange.json b/test/schemas/llm/type/TypeTagRange.json index a1c5607b3d..f81fad64de 100644 --- a/test/schemas/llm/type/TypeTagRange.json +++ b/test/schemas/llm/type/TypeTagRange.json @@ -54,7 +54,6 @@ "maximum": 10 } }, - "nullable": false, "required": [ "greater", "greater_equal", @@ -70,7 +69,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/schemas/llm/type/TypeTagTuple.json b/test/schemas/llm/type/TypeTagTuple.json index bcaa3da461..180c4a6794 100644 --- a/test/schemas/llm/type/TypeTagTuple.json +++ b/test/schemas/llm/type/TypeTagTuple.json @@ -41,7 +41,6 @@ "maxItems": 4 } }, - "nullable": false, "required": [ "tuple" ], diff --git a/test/schemas/llm/type/TypeTagType.json b/test/schemas/llm/type/TypeTagType.json index 889acf32c9..547cbf9caf 100644 --- a/test/schemas/llm/type/TypeTagType.json +++ b/test/schemas/llm/type/TypeTagType.json @@ -28,7 +28,6 @@ "type": "number" } }, - "nullable": false, "required": [ "int", "uint", @@ -42,7 +41,6 @@ } } }, - "nullable": false, "required": [ "value" ], diff --git a/test/src/features/llm.application/test_llm_application.ts b/test/src/features/llm.application/test_llm_application.ts index d853ca5b9e..f41757edfa 100644 --- a/test/src/features/llm.application/test_llm_application.ts +++ b/test/src/features/llm.application/test_llm_application.ts @@ -75,6 +75,7 @@ export const test_llm_application = (): void => { ], options: { separate: null, + recursive: 3, }, }); }; diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts new file mode 100644 index 0000000000..91cba57fdd --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../structures/ArrayRecursive"; + +export const test_llm_schema_ArrayRecursive = _test_llm_schema( + "ArrayRecursive", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..13f79fb099 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_ArrayRecursiveUnionExplicit = _test_llm_schema( + "ArrayRecursiveUnionExplicit", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..dc43854316 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema("ArrayRecursiveUnionExplicitPointer")( + typia.llm.schema(), + ); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..0abd77a4f1 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_ArrayRecursiveUnionImplicit = _test_llm_schema( + "ArrayRecursiveUnionImplicit", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..6f5d0cd4cd --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedNullable.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_ArrayRepeatedNullable = _test_llm_schema( + "ArrayRepeatedNullable", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..9ef3739629 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedRequired.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_ArrayRepeatedRequired = _test_llm_schema( + "ArrayRepeatedRequired", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..709c75ca17 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnion.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_ArrayRepeatedUnion = _test_llm_schema( + "ArrayRepeatedUnion", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnionWithTuple.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnionWithTuple.ts new file mode 100644 index 0000000000..7c265944b4 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnionWithTuple.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ArrayRepeatedUnionWithTuple } from "../../structures/ArrayRepeatedUnionWithTuple"; + +export const test_llm_schema_ArrayRepeatedUnionWithTuple = _test_llm_schema( + "ArrayRepeatedUnionWithTuple", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicTree.ts b/test/src/features/llm.schema/test_llm_schema_DynamicTree.ts new file mode 100644 index 0000000000..e5aef02a8a --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_DynamicTree.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { DynamicTree } from "../../structures/DynamicTree"; + +export const test_llm_schema_DynamicTree = _test_llm_schema("DynamicTree")( + typia.llm.schema(), +); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectPartial.ts b/test/src/features/llm.schema/test_llm_schema_ObjectPartial.ts new file mode 100644 index 0000000000..c627c1ed48 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ObjectPartial.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../structures/ObjectPartial"; + +export const test_llm_schema_ObjectPartial = _test_llm_schema("ObjectPartial")( + typia.llm.schema(), +); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/test_llm_schema_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..de85867971 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ObjectPartialAndRequired.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_ObjectPartialAndRequired = _test_llm_schema( + "ObjectPartialAndRequired", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectRecursive.ts b/test/src/features/llm.schema/test_llm_schema_ObjectRecursive.ts new file mode 100644 index 0000000000..30972d8b46 --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ObjectRecursive.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../structures/ObjectRecursive"; + +export const test_llm_schema_ObjectRecursive = _test_llm_schema( + "ObjectRecursive", +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectRequired.ts b/test/src/features/llm.schema/test_llm_schema_ObjectRequired.ts new file mode 100644 index 0000000000..11233633cf --- /dev/null +++ b/test/src/features/llm.schema/test_llm_schema_ObjectRequired.ts @@ -0,0 +1,8 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../structures/ObjectRequired"; + +export const test_llm_schema_ObjectRequired = _test_llm_schema( + "ObjectRequired", +)(typia.llm.schema()); diff --git a/website/pages/docs/llm/schema.mdx b/website/pages/docs/llm/schema.mdx index fdff63766e..b6fb15c4cc 100644 --- a/website/pages/docs/llm/schema.mdx +++ b/website/pages/docs/llm/schema.mdx @@ -674,7 +674,7 @@ import typia from "typia"; ## Restrictions -LLM schema does not support `bigint` type, and recursive type either. +LLM schema does not support `bigint` type. LLM schema is based on the JSON schema definition of the OpenAPI v3.0 specification. Therefore, limitations of the JSON schema is also applied to the LLM schema, and the `bigint` type is not supported in the LLM function calling schema composition. @@ -701,45 +701,112 @@ Found 1 error in src/llm.schema.bigint.ts:3 -Also, LLM schema does not support reference type that is embodied by the `OpenApi.IJsonSchema.IReference` type with `$ref` property. Therefore, if recursive type comes, no way to express it in the LLM schema, and it would be compilation error in the `typia.llm.application()` function. +Also, LLM schema does not support reference type that is embodied by the `OpenApi.IJsonSchema.IReference` type with `$ref` property. Therefore, if recursive type comes, +no way to express it perfectly in the LLM schema. LLM schema just repeat the recursive structure 3 times, and remove the recursive type after the 4 depths. - +For reference, if the recursive type comes from the array type, it would be zero length array type at the fourth step. Otherwise the recursive type comes from a property and the property is optional, the 4th property would be removed from the object type. At last, if the recursive type is combined as an `oneOf` type, the type would be removed from there. + + ```typescript filename="example/src/llm.schema.recursive.ts" showLineNumbers -import typia from "typia"; +import typia, { tags } from "typia"; -typia.llm.schema(); +typia.llm.schema(); -interface Recursive { - id: number; - children: Recursive[]; +interface IDepartment { + id: string & tags.Format<"uuid">; + name: string; + department: IDepartment[]; } ``` -```bash -src/llm.schema.recursive.ts:3:1 - error TS(typia.llm.schema): unsupported type detected - -- Recursive - - LLM schema does not support recursive type. - -- Recursive: Recursive - - LLM schema does not support recursive type. - -- Recursive.children: Recursive - - LLM schema does not support recursive type. - -3 typia.llm.schema(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Found 1 error in src/llm.schema.recursive.ts:3 +```javascript filename="example/bin/llm.schema.recursive.js" showLineNumbers +"use strict"; +var __importDefault = + (this && this.__importDefault) || + function (mod) { + return mod && mod.__esModule ? mod : { default: mod }; + }; +Object.defineProperty(exports, "__esModule", { value: true }); +const typia_1 = __importDefault(require("typia")); +({ + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + department: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + department: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + department: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + department: { + type: "array", + items: {}, + maxItems: 0, + }, + }, + required: ["id", "name", "department"], + additionalProperties: false, + }, + }, + }, + required: ["id", "name", "department"], + additionalProperties: false, + }, + }, + }, + required: ["id", "name", "department"], + additionalProperties: false, + }, + }, + }, + required: ["id", "name", "department"], + additionalProperties: false, +}); ``` And if you put any type of native classes like `Map` or `Uint8Array`, it would also be error, either. By the way, only `Date` class type is exceptional, and it would be considered as `string & Format<"date-time">` type like below. - + ```typescript filename="example/src/llm.llm.date.ts" showLineNumbers import typia from "typia";